Understanding and summary of red black tree
Copyright notice: This article is the original article of CSDN blogger "Zhang Yanfeng ZYF", which follows the CC 4.0 BY-SA copyright agreement. For reprint, please attach the original source link and this notice. Original link: https://blog.csdn.net/xiaofeng10330111/article/details/106080394
catalogue
1, Basic understanding ...
Posted by GeXus on Tue, 08 Feb 2022 15:36:53 +0100
HashMap underlying principle and some problems induction
hashmap 1.7 capacity expansion occurs before element addition, and 1.8 capacity expansion occurs after element addition
Difference between hashmap 1.7 and 1.8 when adding new elements, 1.7 is added to the head and 1.8 is added to the tail. If it exceeds the preset value, it will turn into a red black tree
The element subscript calculation of ...
Posted by ben14 on Tue, 08 Feb 2022 14:33:17 +0100
Interviewer: you don't even know how to restore the binary tree?
Recover the binary tree according to traversal
In the knowledge of binary tree, finding or traversing binary tree is a very important knowledge point. Because the author only paid attention to the traversal process of binary tree before, but ignored the importance of the inverse process of recovering binary tree from traversal. When I saw an a ...
Posted by jarriola on Tue, 08 Feb 2022 10:29:10 +0100
[sword finger Offer] personal learning notes_ 68_ Nearest common ancestor of binary search tree
Brushing date: 7:49 am Sunday, May 30, 2021
Personal question brushing records and code collection are all from leetcode
After much discussion and consultation, we now intend to work in the direction of Java
The main answer language is Java
Title:
Sword finger Offer 68 - I. nearest common ancestor of binary search tree
Simple d ...
Posted by npsari on Tue, 08 Feb 2022 02:50:43 +0100
Algorithm training 𞓜 sword finger Offer 07 Rebuild binary tree
Method 1: recursion, starting from the root node, regards each node under the root node as the root node (the idea of recursion), and then according to the characteristics of preorder traversal, the first value of the traversal result is the value of the root node. Therefore, the recursive assignment process can be determined, and then the pos ...
Posted by Scabby on Tue, 08 Feb 2022 01:39:50 +0100
Recursion (with examples)
1. What is recursion
A function call itself is recursive. Recursion usually transforms a large and complex problem into subproblems layer by layer until the subproblem can be solved without further recursion. Recursion greatly reduces the amount of code.
Generally speaking, a recursive algorithm consists of the following parts:
A termination ...
Posted by zplits on Mon, 07 Feb 2022 21:03:07 +0100
[Greedy] 1405. Longest happy string. M
1. Description
1. If the string does not contain any'aaa','bbb'or'ccc' as a substring, then the string is a'happy string'. 2. Give you three integers a, b, c. Please return any string s that meets all of the following conditions: s is a happy string as long as possible. There are at most a letter'a', B letter'b', c letter'c'in s. s contains on ...
Posted by nemxu on Mon, 07 Feb 2022 19:13:04 +0100
Data structure: Hash list implementation ideas and examples
Preface
Here's a little cold blog _Column on High Quality Technology and Good Writing Personal Public Number, share some technical articles, and pits encountered Current Series: Data Structure Series Source code git repository' Data structure code address Code Git repository address
Hashtable
A basic introduction to hash tables
A H ...
Posted by Stu on Mon, 07 Feb 2022 18:41:25 +0100
Analysis of High Precision Large Number Addition, Subtraction, Multiplication and Division Algorithms
High Precision Addition, Subtraction, Multiplication and Division Algorithms
What is high precision?
High Accuracy Algorithm s are mathematical computational methods for processing large numbers. In general scientific calculations, hundreds or more decimal places are often counted, of course, hundreds of billions of large numbers. Generall ...
Posted by Teck on Mon, 07 Feb 2022 18:30:16 +0100
Chapter 8, find learning notes
Search: (Searching) is to determine a data element (or record) whose keyword is equal to the given value in the lookup table according to a given value.
A Search Table is a collection of data elements (or records) of the same type.
A key is the value of a data item in a data element.
Static Search Table: a lookup table that is used only for ...
Posted by fizzwizz on Mon, 07 Feb 2022 14:09:20 +0100