Sword finger offer brush questions 20 minutes (07 16 33)

Sword finger Offer 07 Rebuild binary tree Enter the results of preorder traversal and inorder traversal of a binary tree, please build the binary tree and return its root node. It is assumed that the input pre order traversal and middle order traversal results do not contain duplicate numbers. This problem uses the idea of recursion. Use pre ...

Posted by riiel on Wed, 05 Jan 2022 17:38:45 +0100

Implementation of basic operation of queue

Implementation of basic operation of queue Experimental purpose Master the abstract data type of queue, correctly select it in corresponding application problems, master the implementation method of queue (sequential and chained), the implementation algorithms of two storage structures and basic operations, pay attention to the judgment condi ...

Posted by R_P on Tue, 04 Jan 2022 17:51:04 +0100

Data structure and algorithm 1 - linked list

Data structure and algorithm - linked list Previous contents 1 - linked list 2-stack 3-queue 4-tree 5-fig 6-greedy algorithm 7-recursion and divide and conquer 8-sort 9 - query 10 - dynamic programming 11-STL Library Basic concepts Linear table: a finite sequence of zero or more elements 1, Storage structure of linear table There ...

Posted by blacksnday on Mon, 03 Jan 2022 22:55:57 +0100

Introduction to C language single linked list (with examples)

"Ctrl AC! Together AC!" catalogue preface: Definition and node of single linked list: Definition of single linked list: Structure of single linked list node: Establishment of single linked list: Insert a new node with data x into the single linked list: Create linked list by tail interpolation: Traversal of single linked list ...

Posted by DirtySnipe on Mon, 03 Jan 2022 13:08:26 +0100

Deep cultivation JavaSe -HashMap underlying source code analysis

1. Introduction ① JDK1. Before 8, HashMap was composed of array + linked list. Array is the main body of HashMap, and linked list mainly exists to solve Hash conflict. When an element is put into the set, the Hash value of key, namely hash(key), will be calculated, Then perform bitwise sum operation with the size of the array to calculate ...

Posted by ExpendableDecoy on Mon, 03 Jan 2022 00:06:56 +0100

c + + freshman basic information statistics software

catalogue Basic software functions: 1. Enter new student's personal information 2. Newly added information 3. Delete all information according to the new student's name 4. Display the new student information that has been entered and added ​ 5. Search for information by student's name 6. Ranking from high to low according to the fre ...

Posted by heshan on Sun, 02 Jan 2022 22:02:47 +0100

LeetCode problem brushing learning

First day of study I use C + +, please forgive me for the mistakes. The original intention of the article is only to urge me to study. If it happens to be able to help you, I will be very happy. preface 1, 141 Circular linked list Title: give you a head node of the linked list to judge whether there are links in the linked list. ...

Posted by nainil on Sun, 02 Jan 2022 06:21:54 +0100

Advanced Language Ninth Job

1. Student Information Title Description Now I want to make up a list of student achievement points. Chain list node content includes student name, student number, grade point The input is a list of the names, numbers, and performance points of a group of students, stored in a chain. Delete a student node whose score is less than the averag ...

Posted by atomm on Sun, 02 Jan 2022 00:58:05 +0100

C + + Notes 9: linked list

P.S is a non professional and unfamiliar with C + + and algorithms. Starting from the introduction, he uses the Leetcode platform and draws on the ideas of many predecessors. The blog is only for recording. Three questions in this issue's punch list: corresponding to < sword finger Offer 06 Print linked list from end to end > < sword f ...

Posted by iraja on Sat, 01 Jan 2022 07:39:27 +0100

[data structure and algorithm] LeetCode single linked list exercise

Reverse linked list ​ Title link here Three pointers: Problem solving ideas: First analyze the special case. When the linked list is empty or there is only one node, directly return to head When there are more than one node in the linked list, we first consider whether we can reverse the pointer in turn, so as to reverse the linked list ...

Posted by quetz67 on Thu, 30 Dec 2021 11:13:37 +0100