Python programming to sort keyboard input elements binary tree sorting
Today, let's take a different sort method - binary tree sort. This sorting method is more interesting and easy to operate.
This paper refers to Python data analysis from introduction to mastery, Zhang Xiaoyu and Li Jing, electronic industry press, 5.3 2 sorting
Binary tree sorting
The process of binary tree sorting is mainly the constru ...
Posted by Bogart on Sun, 26 Dec 2021 08:35:55 +0100
Bidirectional linked list of data structure
1. Define nodes (take heroes of hero League as an example)
public int no; // Hero number public String name; // Hero's name public String nickName; // Nickname of hero public HeroNode2 next; // Point to next node public HeroNode2 pre; // ...
Posted by greggustin on Sun, 26 Dec 2021 08:21:43 +0100
Data structure -- basic operation of string (C language)
strand
preface
This paper introduces the programming implementation of the basic operation of string in data structure, and master the basic operations such as string establishment, traversal, substring and positioning
Tip: the following is the main content of this article. The following cases can be used for reference
1, What is ...
Posted by lur on Sun, 26 Dec 2021 07:50:12 +0100
Longest common subsequence (LCS) algorithm
The three methods can be used for reference, but the code part is written by yourself. Although the final running results are correct, it is inevitable that there will be some thoughtless places in this process. If you find some errors in the code, you are welcome to correct. At the same time, new ideas can also be put forward!
The sequential ...
Posted by kokomo310 on Sun, 26 Dec 2021 06:10:38 +0100
Data structure: stack implementation inverse Polish calculator
Stack implementation inverse Polish calculator
preface
Part I Bowen The stack implementation infix expression calculator has been introduced in. The infix expression shape such as "1 + ((2 + 3) * 4) - 5" is easy to calculate for people, but it is difficult for computers. On the contrary, the suffix expression "1 23 + 4 * + 5 -& ...
Posted by swampone on Sun, 26 Dec 2021 02:29:45 +0100
Large top pile and small top pile
Large top pile and small top pile
What is a heap
The essence of heap is a one-dimensional array maintained by the structure of complete binary tree. According to the characteristics of the reactor, the reactor is divided into large top reactor and small top reactor Large top heap: the value of each node is greater than or equal to the value o ...
Posted by jsucupira on Sat, 25 Dec 2021 23:10:21 +0100
Summary of basic knowledge of 60000 word data structure (including written examination and interview exercises)
catalogue
preface
1, Time complexity and space complexity
1. Algorithm efficiency
2. Time complexity
① Concept of time complexity
② Asymptotic representation of large O
③ Common time complexity calculation examples
3. Spatial complexity
2, Linear list (single linked list and double linked list)
1. Concept
2. Sequence table
① Concept ...
Posted by johnie on Sat, 25 Dec 2021 23:01:16 +0100
Algorithm - discretization
The discretization in this section refers in particular to the order preserving discretization of integers.
What is 1
There is such a problem in processing: processing the number (eg.105) with a small number in a large data range (eg.0 ~ 109), that is, "large value range, small number". The large storage space and high time complexi ...
Posted by kpowning on Sat, 25 Dec 2021 22:08:30 +0100
Data structure - binary tree - Application - BST&AVL&RBT
Data structure - binary tree - Application - BST & AVL & RBT
Binary sort tree (BST)
Basics
demand
Give you a sequence (7, 3, 10, 12, 5, 1, 9), which is required to query and add data efficiently.
Use array (1) The array is not sorted. Advantages: it is added directly at the end of the array, which is fast. Disadvantages: t ...
Posted by jesse_james on Sat, 25 Dec 2021 21:46:02 +0100
Data Structure of Menstruation-Personal Review (Simple Text)
1 Array, Chain List
Mode 1 Static Initialization
int[] arr0 = new int[]{2,4,6,8};
Mode 2 implicit initialization
double[] arr1 = {2.2,3.3,4.4};
Mode 3 dynamic initialization
int[] arr2 = new int[3];//[3] means that this array can hold three elements
arr[0] = 2;//[0] The first data representing the array stores 2 in the first position of the ...
Posted by darthbutternutz on Sat, 25 Dec 2021 21:02:50 +0100