Learning notes of data structure, algorithm and application - C + + language description - binary search tree

1, Binary search tree We learned the abstract data type dictionary earlier. The average time required for dictionary operations (find, insert and delete) using hash is O ( 1 ) O(1) O(1). The worst-case time of these operations is linear with the number of elements in the dictionary. Hash does UTF-8...

Posted by rptasiuk on Thu, 30 Sep 2021 07:44:18 +0530

Effective C++|Chapter 5: Implementation

Item26: postpone the occurrence time of variable definition as much as possible The function of the following example defines the variable "encrypted" prematurely: if an exception is thrown, the construction consumption of the variable "encrypted" is wasted string encryptPassword(const string& UTF-8...

Posted by clodius on Fri, 01 Oct 2021 01:35:06 +0530

Blocking IO and non blocking IO

Blocking and non blocking IO Everything can be blocked or non blocked Concept of blocking: What is blocking Because some resources and conditions were not reached, the process stalled Cost of blocking Wasting time, like sleep, wastes system resources Non blocking concept: What is non blocking: UTF-8...

Posted by varun_146100 on Fri, 01 Oct 2021 02:20:36 +0530

2021-09-30 swipe questions and punch in every day

2021-09-30 swipe questions and punch in every day Force buckle - linked list 25. Turn over the linked list in groups of K Give you a linked list. Each group of k nodes will be flipped. Please return to the flipped linked list. k is a positive integer whose value is less than or equal to the lenUTF-8...

Posted by s_ff_da_b_ff on Fri, 01 Oct 2021 03:14:25 +0530

c + + advanced exercises -- improvement

Share a website that can practice questions https://www.dotcpp.com/oj/problem1002.html Register an account and you can do questions online subject Topic 1 Title: there is such an intelligence question: "a store stipulates that three empty soda bottles can be changed for one bottle of soda. XiaoUTF-8...

Posted by motofzr1000 on Fri, 01 Oct 2021 10:24:46 +0530

C + + type alias, auto type specifier, decltype type

Type alias: Another common way to use types is to make complex names simpler. The traditional method is to use the typedef keyword: typedef double wages; //Now waves is synonymous with double wages hight=3.14; //Correct, because waves is the alias of double, which is equivalent to double heightUTF-8...

Posted by jibosh on Sat, 02 Oct 2021 03:31:59 +0530

C + + decoration mode

reference resources: Design pattern C + + implementation (11) -- decoration pattern 1. First, if there is a mobile phone and you are constantly changing your mobile phone, you can abstract a class (person) about the mobile phone, inherit it with a specific mobile phone (iphone), and call a unifUTF-8...

Posted by sp2hari on Sat, 02 Oct 2021 06:16:31 +0530

Three features of C + + -- Inheritance

The ultimate meaning of the poem is only to you. Concept of inheritance Inheritance is one of the most important means for object-oriented programming to reuse code. It allows programmers to extend and add new functions on the basis of maintaining the characteristics of the original class, so aUTF-8...

Posted by php3ch0 on Sat, 02 Oct 2021 06:45:18 +0530

Language Programming - Using Qt5 to Realize the Management System of Students'Course Selection (with ideas and codes in extra detail)

QT Installation Details of QT Installation and Basic Operations Click here Task Requirements The Title requirements are as follows: The system needs to create and manage the following information: Student information: school number, name, class, phone, birthday, address, course selection datasUTF-8...

Posted by jeffkee on Sat, 02 Oct 2021 21:52:52 +0530

Red-Black Tree, set, map

red-black tree The red-black tree is a highly balanced binary search tree. Its arrangement rules favor serach and insert, and it maintains a depth balance where none of the nodes is too deep.Red and Black Trees provide traversal operations and iterators to obtain an ordered sequence (median traUTF-8...

Posted by billspeg on Sat, 02 Oct 2021 22:15:56 +0530