Data structure note Directory:
1. Introduction and time complexity 2. Linear meter 3. Trees 4. Fig 5. Find 6. Sorting
6.1 basic concepts
6.1.1 objectives
Order keywords
6.1.2 classification
Internal sort
Data elements are all in memory during sorting
External sort
During the sorting process, data is constantly moving bet ...

Posted by bibie on Sun, 21 Aug 2022 09:50:12 +0300

summary
Today, this multi-school should be the best one to hit this summer vacation (although the ranking is not very high). My starting teammate found that the tree dp was signed in for question 1009. I thought about guessing an even-numbered side. I stared at my teammate and wrote A for ten minutes. Then we went to see 1003 again. After my t ...

Posted by thomasgrant on Thu, 18 Aug 2022 22:30:52 +0300

Monotonic queue optimization DP
Maximum subsequence sum
Source: https://www.acwing.com/problem/content/137/
Title Description
Enter a length of
n
n
An integer sequence of n, from which a length of no more than
m
...

Posted by FlashbackJon on Sun, 07 Aug 2022 21:36:46 +0300

✅🎡 Personal homepage: Program ape chase
✅🎡 Series column: Algorithm set
✅🎡 Current status: create Java learning road (zero foundation to employment practice) series, which is currently updated to JAVAWEB development
✅🎡 About the author: Hello, everyone. I'm a program ape chaser, a new star creator in the whole stack field, an ...

Posted by grandman on Wed, 03 Aug 2022 22:19:23 +0300

Sequential implementation of queues
typedef struct{
int data[MaxSize];
int front,rear;
} SqQueue;
For the initialization of the sequence queue, front points to the queue head element, and rear points to the next position of the queue tail element, that is, the next position that should be inserted.
void Init(SqQueue q){
q.front=0 ...

Posted by natbrazil on Fri, 01 Jul 2022 21:46:43 +0300

introduction
>_< Now we need to arrange a timetable for the students (the learning order of the course)
But it's not that simple:
curriculum
Precursor course
Course 0
Course 1
Course 0, course 4
Course 2
Course 3
Course 0
Course 4
Course 5
Course 3
Course 6
Course 3
Might as well draw a Graph and try i ...

Posted by noimad1 on Wed, 25 May 2022 22:41:14 +0300

Heap and heap sorting
Definition of heap
The heap is a complete binary tree: except for the last layer, the other layers must be full at several points, and the nodes of the last layer must be filled gradually from left to right
The value of each parent node in the heap must be greater than or equal to (or less than or equal to) the value of ...

Posted by activeradio on Wed, 25 May 2022 13:10:30 +0300

Graph coloring problem
[1]
Given undirected connected graphs, G and m have different colors. These colors are used to color the vertices of graph G, and each vertex has a color. Is there a shading method that makes the 2 vertices of each edge in G have different colors.
[2]
If a graph needs at least m colors to make the two vertices connected b ...

Posted by peeps on Wed, 25 May 2022 11:38:54 +0300