Data structure and algorithm: linear table
I Static linked list
1. What is a static linked list a. Static linked list: allocate a whole piece of continuous memory space and place each node centrally. (similar to array) b. The difference between a static linked list and a single linked list is that the static linked list does not store the address pointing to the next node, but the arra ...
Added by MasumX on Sat, 08 Jan 2022 10:40:35 +0200
Linear storage structure -- array (sequential list), linked list, stack, queue
Linear storage structure: array + linked list + string + queue and stack
Author: write Bug My Lago https://www.bilibili.com/read/cv8480862?spm_id_from=333.999.0.0 source: bilibilili
1. Array
1. How to define arrays in java
//Define static array; Specifies the element content of the number, but does not specify the length of the array
int[] a ...
Added by kenneth74 on Sat, 08 Jan 2022 06:39:19 +0200
Data structure - sorting
Java sorting
catalogue
Java sorting
preface
1, Simple sort
1. Bubble sorting
2. Select Sorting
3. Insert sort
2, Advanced sorting
1. Hill sort
2. Merge and sort
3. Quick sort
3, Stability of sorting
preface
Sorting is a very common requirement. It provides some data elements and sorts them according to certain rules. The sorting ...
Added by saviiour on Fri, 07 Jan 2022 05:15:55 +0200
Linear table of [data structure and algorithm] - simple implementation of sequential table java code
preface
This article is equivalent to a note arrangement of my previous study of data structure. You are welcome to comment and point out the shortcomings, which will be updated in the future.
catalogue
1, Definition of linear table
2, Logical characteristics of linear table
3, One of the storage structures of linear table -- sequential s ...
Added by ThermalSloth on Fri, 07 Jan 2022 03:23:32 +0200
Use and example records of parallel search set (P1536 & P1551)
1, Overview of parallel search set
1. Related concepts
(1) Introduction of union search set
problem
There are several sets, {a},{b},{c},{d},{e} Design two methods
Judge whether two elements are in the same set, issameset(a, b)Merge the set of elements a and B into union(a, b)
Solution
Identify a representative element for each c ...
Added by happs on Thu, 06 Jan 2022 16:24:05 +0200
[C + +] learning notes [16]
STL [i]
1. Birth of STL and related concepts
💖 be born:
For a long time, the software industry has been hoping to build something that can be reusedThe object-oriented and generic programming idea of C + + aims to improve the reusabilityIn most cases, data structures and algorithms fail to have a set of standards, resulting in a lot of ...
Added by hofdiggity on Thu, 06 Jan 2022 15:02:39 +0200
Lesson 1: priority queue (heap)
catalogue
1, Related concepts of heap
1.1 reactor
1.2 subscript relationship
1.3 classification
2, Manually implement heap
2.1 establishment of large root pile
2.2 adding data
2.3 pop up the top data
2.4 viewing top data
2.5 topK problem
2.6 heap sorting
2.7 finding and minimum K-pair numbers
3, Priority queue in Java
1, Relate ...
Added by jimthunderbird on Thu, 06 Jan 2022 13:58:41 +0200
python object oriented
catalogue
Define class
Creating and working with objects
Object oriented pillar
@property decorator
__ slots__ magic
Static methods and class methods
Relationships between classes
Inheritance and polymorphism
Define class
In Python, you can use the class keyword to define a class, and then define methods in the class through the prev ...
Added by gofeddy on Thu, 06 Jan 2022 13:31:14 +0200
[data structure and algorithm] in-depth analysis of the solution idea and algorithm example of "different binary search tree II"
1, Title Requirements
Give you an integer n, please generate and return all different binary search trees composed of N nodes with different node values from 1 to N, and you can return the answers in any order.Example 1:
Input: n = 3
Output:[[1,null,2,null,3],[1,null,3,2],[2,1,3],[3,1,null,null,2],[3,2,null,1]]
Example 2:
Input: n = 1
...
Added by waiwai933 on Thu, 06 Jan 2022 08:00:17 +0200
C language implementation of quick sort and optimization and analysis of quick sort
C language to realize quick sorting and its system optimization and analysis
catalogue
I Implementation of quick sort
1. Implementation ideas
2.QSort implementation
3. Implementation of the function Partition()
4. Complete code
Â
II System optimization of quick sort
1. Optimize the selection of keyword pivotkey
2. Optimize unnecessary ...
Added by BobcatM on Thu, 06 Jan 2022 07:03:58 +0200