Chapter VII class and object
Chapter VII class and object
Import
The object in the program is the simulation of the object in reality, with attribute and function / behavior;Abstract the common attributes and behaviors of the same class of objects to form a class, and the object is an instance of the class;Class encapsulates data and data processing functions, hides inte ...
Added by blackbeard on Sun, 06 Feb 2022 21:29:00 +0200
Memory configuration and release of space Configurator
catalogue
I Configurator for SGI
II First level configurator (malloc_alloc)
III Secondary Configurator
3.1 notes
3.2 space configurator allocate()
3.3 refill(size_t n)
3.4 encapsulate the first and second level configurators
I Configurator for SGI
SGI designed a two-level configurator: 1 When the configuration block exceeds 128 byte ...
Added by frkmilla on Sun, 06 Feb 2022 20:29:14 +0200
Algorithm brush questions [Luogu P1185] to draw binary tree
Whimsical journey: my original blog is completely knocked by hand, absolutely not carried, and there can be no repetition in the whole network; I don't have a team, I only share it for technology lovers, and all the content doesn't involve advertising. All my articles are only published in CSDN and personal blog (must be the domain name of fant ...
Added by snorcha on Sun, 06 Feb 2022 20:07:37 +0200
[C + +] object oriented polymorphism
6.1 overview
When a command is issued, different objects make different actions after receiving the same command.
Strictly speaking: the same object receives different messages, or different objects produce different actions when they receive the same message.
6.2 virtual function machine implementation principle
6.2.1 static polymorphi ...
Added by Joseph Sliker on Sun, 06 Feb 2022 11:02:17 +0200
Summary of the first phase of winter vacation intensive training in the first day of junior high school
Quick sort
graphic
First find the left sentry as the reference number, move the right sentry to a number smaller than the reference number, and then move the left sentry to a number larger than the right sentry.
Swap two numbers
Repeat the process until the two sentinels meet
Exchange the benchmark number with the original number ...
Added by Superian on Sun, 06 Feb 2022 09:35:05 +0200
Hierarchical tree building and traversal of C + + binary tree
Summary
Traversal: left and right roots first; Middle order traversal: left root right; Post order traversal: left and right roots.If you select a hierarchy to build a tree, you need a chained queue to assist the implementation (specify, don't ask why).The specific operation process of the auxiliary queue (key understanding): the data field p ...
Added by ccooper on Sun, 06 Feb 2022 05:35:49 +0200
LeetCode 106. Constructing binary tree from middle order and post order traversal sequence [c++/java detailed problem solution]
1. Title
Given two integer arrays inorder and postorder, inorder is the middle order traversal of the binary tree and postorder traversal of the same tree, please construct and return this binary tree.
Example 1:
Input: inorder = [9,3,15,20,7], postorder = [9,15,7,20,3]
Output:[3,9,20,null,null,15,7]
Example 2:
Input: inorder = [-1 ...
Added by mchaggis on Sun, 06 Feb 2022 04:55:56 +0200
Learning notes of C + + course in Tsinghua University -- Chapter 10 generic programming
reference material STL Usage Summary
Basic concepts of STL
Basic components
nameexplainContainerHolds an object that contains a set of elementsiteratorIterators are generalized pointers that provide access to each element in a containerFunction objectObjects that behave like functions, header files < functional >AlgorithmsWidely us ...
Added by prabhuksmani on Sun, 06 Feb 2022 01:42:49 +0200
C++ Review Notes
Recently I started preparing for the Spring Festival Entrance. Writing a blog should be a review
1. Get the number of elements in the array
int arr[] = {1,2,3,4,5,6,7,8,9};
cout<<"The array has:"<<sizeof(arr)/sizeof(arr[0])<<endl;
cout<<"The first address of the array:"<<arr<<endl;
cout<<"The first add ...
Added by JREAM on Sat, 05 Feb 2022 19:34:32 +0200
JNI Native dynamic registration drill
preface:
A few days ago, I shared an article about TS stream parsing. A friend asked, why don't you use dynamic registration? What is JN dynamic registration? Today, I'll introduce it to you.
1, Introduction to JNI Native registration
There are mainly two kinds of jni native registration: static registration and dynamic registration. Among t ...
Added by prbrowne on Sat, 05 Feb 2022 14:18:55 +0200