1, Definition (logical structure) and basic operation (operation) of linear table
Definition: a linear table is a finite sequence of n (n > = 0) data elements with the same data type, where n is the table length. When n = 0, the linear table is an empty table. If L is used to name the linear table, it is generally expressed as L = (a1 , a2 ...
Posted by elgordo1960 on Mon, 21 Feb 2022 11:50:09 +0100
First of all, what we're talking about here are ordinary data structures. I'm not engaged in algorithm competition. Noriko was born. I can only solve conventional problems. In addition, the following is a summary of my personal experience. No algorithm book will write these things, so please try to understand my perspective and don't dwell on d ...
Posted by toovey on Sun, 20 Feb 2022 19:25:49 +0100
[PS] I learned it in school, and I have learned it in Xinjing before. This blog is only used as personal knowledge sorting and backup. If there are mistakes, please help point out, thank you!
The citation of this article is basically from Starting Out with C++ From Control Structures Through Objects 8th Global Edition
1. Linked List
Posted by Solar on Sun, 20 Feb 2022 18:39:26 +0100
1 sorting overview
Let's take a look at the relationship between the eight sorts:
1.1 insert sort
1.1.1 direct insertion sort
Basic idea: in a group of numbers to be sorted, suppose the front (n-1), in which [n > = 2] numbers are already in good order. Now insert the nth number into the front ordinal number to ma ...
Posted by modulor on Sun, 20 Feb 2022 16:00:18 +0100
[summary of interview algorithm questions] the series mainly summarizes common algorithm questions with each algorithm as a unit. The main questions are derived from the two topics of leetcode's sword finger offer and hot100. The link is as follows: Sword finger offer and hot100
Here is a brief explanation. There may be mu ...
Posted by j8h9x on Sun, 20 Feb 2022 15:54:08 +0100
Recently, I looked at jiangly's CF1638E code and found that jiangly's Kodori tree is implemented with map. So I studied it.
CF1638E jiangly code
If you haven't come into contact with the Kodori tree, please learn the following first.
The principle and set implementation of Kodori tree
Complexity analysis of Kodori tree
Posted by Sudden on Sun, 20 Feb 2022 15:08:29 +0100
Data structure and algorithm
1. Overview of data structure and algorithm
Data structure is a subject that studies the way of organizing data. With programming language, there will be data structure Learning data structure well can write more beautiful and efficient code.
Program = data structure + algorithm
Data structure is th ...
Posted by alfpalafox on Sun, 20 Feb 2022 14:37:11 +0100
Reprint: Manual of facial classics Chapter 8 "LinkedList inserts faster than ArrayList? Are you sure?"
2. Data structure
Linked + List = linked list + list = linked list
LinkedList is implemented based on linked list. Data nodes are interspersed by two-way chains next and prev. Therefore, when inserting data, you do ...
Posted by Peggy on Sun, 20 Feb 2022 14:25:14 +0100
Sequential storage structure (static allocation)
Five operations in which top is an integer (when top points to the next position of the top element of the stack)
Five operations in which top is an integer (when top points to the top element of the stack)
Sequential storage structure (dynamic allocation)
Five o ...
Posted by jonniejoejonson on Sun, 20 Feb 2022 13:47:15 +0100
1, Structure type declaration
C language has int,char and other keywords to declare data types. Similarly, a structure can also declare a structure type.
1. Definition, declaration and use:
(1) First kind
struct example //Define a structure (keyword + structure name)
struct example S; ...
Posted by fingerprn on Sun, 20 Feb 2022 11:35:54 +0100