[data structure] linked list (one-way headless acyclic) (C language)
1. Basic concepts:
Linked list: a non continuous and non sequential storage structure in the physical storage structure. The logical order of data elements is realized through the pointer link order in the linked list.
The linked list has 8 structures:
1. Headless one-way non circulation 2. Headless one-way circulation 3. Leading single circ ...
Added by ruthsimon on Sun, 26 Dec 2021 03:35:55 +0200
Dynamic sequence table of data structure (including game menu)
In the previous article, we talked about the static sequence table of data structure and the implementation of static sequence table. For details, see my previous article - > > > Static sequence table of data structure.
We can know that the disadvantage of static sequence table is that because it uses fixed length array, it will waste ...
Added by chrbar on Fri, 24 Dec 2021 21:04:53 +0200
Super hard core of data structure popular complexity, array, linked list OJ question 2W + text + picture explanation
OJ question
First, let's understand the forms of OJ questions. There are two forms:
Interface type
Provide an interface function instead of a complete program. Just implement this function. After submitting the program, this code will be submitted to the OJ server, and it will be merged with other test programs (header file and main ...
Added by maxx99 on Fri, 24 Dec 2021 16:26:44 +0200
C + + linked list entry exercise
Find program 2 in the comments (insert several nodes in the FRONT of the list). Modify The program inserts only three (3) nodes in front of the list. Test procedure.
Q1 solution:
Classes and functions remain unchanged. This is one of the main reasons for using functions, That is, we can change one function (or main function) while leaving eve ...
Added by stubarny on Thu, 23 Dec 2021 09:27:01 +0200
Detailed explanation of red and black trees in HashMap
HashMap in Java uses the linked list method to solve hash conflicts. The HashMap principle is that key value pairs with the same bucket subscript are stored in a linked list. When the linked list becomes longer, searching and adding (you need to determine whether the key already exists) need to traverse the linked list, and the speed will becom ...
Added by *mt on Thu, 23 Dec 2021 03:21:57 +0200
A variety of implementations of linear tables and complete codes of various operations (10000 word analysis)
11 operations on linear tables
1. Construct an empty linear table ----- InitList(*L)
2. Assign value to linear table ---------- ValueList(*L)
3. Destroy linear table - destrorylist (* l)
4. Reset linear table - ClearList(*L)
5. Judge whether the linear table is empty ----- ListEmpty(L)
6. Get length of linear table ---------- GetLengt ...
Added by tkm on Wed, 22 Dec 2021 08:00:38 +0200
Basic skills of data structure and algorithm: whether a single linked list has a ring, two ways
background
Data structure is the basic skill of our programmers, which is often used in daily work and job interview; Moreover, in recent years, the job competition of programmers is becoming greater and greater, and data structures and algorithms have become necessary questions in the interview of large factories. What I know: Huawei technici ...
Added by chenggn on Wed, 22 Dec 2021 02:00:37 +0200
Java data structure Lecture 2 - array / linked list
Common data structures and algorithm implementation (sorting / searching / array / linked list / stack / queue / tree / recursion / massive data processing / graph / bitmap / Java data structure)
As the basic skills of programmers, data structures and algorithms must be studied steadily. The bottom layer of our common framework is all kinds ...
Added by packland on Tue, 21 Dec 2021 19:17:02 +0200
Insert sort - linked list sorting algorithm for array and array storage structure
Insert sort idea
When sorting, each element to be sorted is compared with the previous sorted element. If the reverse order occurs, you need to find a suitable position in the sorted element sequence that can keep it in order, find the insertion position, move the sorted sequence back to make space, and then insert the elements to be sorted;
...
Added by olechka on Tue, 21 Dec 2021 07:46:00 +0200
[learning 100 million points every day] - OJ questions of stack and queue
1. Implement stack with queue
graphic
Since two queues are used to implement the stack, it must be related to the nature of the queue. It must be changed back and forth. Let's take a look at this process.
code implementation
typedef struct {
Queue* q1;
Queue* q2;
} MyStack;
/** Initialize your data structure here. */
M ...
Added by jstarkey on Mon, 20 Dec 2021 06:19:59 +0200