Traversal of binary tree
preface:
·The depth first traversal and width first traversal of binary tree are the basis for solving the problem of binary tree. Mastering the common traversal methods of binary tree can make us solve the problem of binary tree more handy.
catalogue
preface:
Recursive form of pre -, middle - and post order traversal of binar ...
Added by webpals on Tue, 01 Feb 2022 11:52:55 +0200
Hash lookup - a way to handle conflicts
The following contents are from the data structure (2nd Edition) by grandma Chen Yue. The notes are for your reference only.
Open addressing
The so-called open addressing method is to find another empty hash address once there is a conflict, that is, when the address has stored other elements. In an unfilled hash table, an empty hash address ...
Added by SoundreameR on Tue, 01 Feb 2022 08:19:37 +0200
Hard core resources! Redis five data structures and three advanced data structures analysis (detailed explanation)
The last one shared "understanding JVM in depth", and this one shared "Redis five data structures and three advanced data structure analysis".
preface
The most important and fundamental part of Redis is its rich data structure. The reason why Redis stands out is that it has rich data structure and can support a variety ...
Added by kaedus on Tue, 01 Feb 2022 06:14:41 +0200
Segment tree of advanced data structure
Segment tree of advanced data structure
1. Prefix and
Given an array arr, the array can be very large. During the running of the program, you may have to do several query and update operations: query(arr, L, R) means to calculate the sum of all numbers from subscript L to subscript r in the array arr. update(arr, i, val) means to change the n ...
Added by Xoom3r on Mon, 31 Jan 2022 23:16:45 +0200
Implementation of JavaScript linked list
Linked list
Linked list concept
Linked list: a storage structure of data. A linked list contains several nodes. Each node contains at least one data field and one pointer field, and the pointer field points to the next node. Node: the storage image of the data element, which is composed of the data field storing the data element and the p ...
Added by dsds1121 on Mon, 31 Jan 2022 20:58:47 +0200
[data structure] how to check weight efficiently in the case of large amount of data
Scene introduction
Originally there were 1 billion numbers, but now there are 100000 numbers. It is necessary to quickly and accurately judge whether these 100000 numbers are in the 1 billion number library?
Solution 1: store 1 billion numbers in the database and query the database. The accuracy is improved, but the speed will be relative ...
Added by raffielim on Mon, 31 Jan 2022 17:51:37 +0200
Basic idea of linked list
The linked list does not require each element to be continuous in the storage space. When creating a new element node, it can be used wherever the space is applied The purpose of unilateral or mutual connection between nodes is achieved through pointer pointing (single finger: single linked list, mutual finger: double linked list) Node of singl ...
Added by Nic on Mon, 31 Jan 2022 15:48:49 +0200
Data structure and algorithm summary
Data structure and algorithm architecture.
1, Time complexity and space complexity
1. What are time complexity and space complexity
How to distinguish the quality of an algorithm, if executed in the program, will be disturbed by various factors, so the concepts of time complexity and space complexity are introduced.
The complexity of this ...
Added by sr20rps13 on Mon, 31 Jan 2022 15:19:10 +0200
Introduction to algorithm - array, linked list, selection and sorting
catalogue
How memory works
Arrays and linked lists
array
Linked list
Compare
Overall comparison
Time complexity
Implementation of linked list in python
test
Select sort
Summary
How memory works
When you go to the supermarket, you should see a storage cabinet at the door. When you go to the supermarket, you store your things in t ...
Added by beboni on Mon, 31 Jan 2022 12:27:39 +0200
Sorting algorithm in data structure -- quick sorting -- basis of C language
Quick sort is an exchange sort method of binary tree structure proposed by Hoare in 1962. Its basic idea is: any element in the element sequence to be sorted is taken as the reference value, and the set to be sorted is divided into two subsequences according to the sort code. All elements in the left subsequence are less than the reference valu ...
Added by neil.johnson on Mon, 31 Jan 2022 12:07:17 +0200