Data structure and arithmetic tree

Basic definition of tree A tree is a set with hierarchical relationship composed of n (n > = 1) finite points. Characteristics of trees Each node has 0 or more child nodesA node without a parent node is called a root nodeEach non root node has only one parent nodeEach node and its descendants can be regarded as a tree as a whole, which is ...

Posted by Black Rider on Fri, 19 Nov 2021 08:09:54 -0800

❥ top ten sorting algorithms ❥ 20000 word nanny tutorial (text analysis + illustration + code implementation + example)

What is an algorithm? At ordinary times, children who study computer often hear the word algorithm. What is an algorithm? There is no clear definition of the algorithm. According to my personal understanding, the algorithm is to solve a specific problem and describe the ideas and steps of solving the problem. In fact, there are many ar ...

Posted by ledtear on Fri, 19 Nov 2021 00:46:36 -0800

java foundation - Inner Class

java foundation - Inner Class 1.1 non static internal class    defining an internal class is very simple. Just put one class inside another. The "class interior" here includes any position in the class. Internal classes can be defined even in methods (the internal classes defined in methods are called local internal classe ...

Posted by duelist on Thu, 18 Nov 2021 21:54:10 -0800

Basic notes on data structure 1: introduction and abstract data types

Basic concepts and terms Data is the symbolic representation of objective things;Data element is the basic unit of data;Data item is the smallest indivisible unit of data. A data element can be composed of several data items;A data object is a collection of data elements with the same properties and a subset of data;A data structure is a colle ...

Posted by deeessay on Thu, 18 Nov 2021 21:47:19 -0800

Introduction to Python to mastery

Function (I) Function parameters do not need to declare types, nor do they need to specify the return value type of the functionFunction does not accept arguments, but also keep a pair ()After the brackets: Basic syntax of function definition and call Example 1: Fibonacci sequence def fib(n): a, b = 1, 1 while a < n: pri ...

Posted by unibroue on Thu, 18 Nov 2021 20:10:19 -0800

LeetCode brush notes binary tree binary search tree properties

Introduction to binary search tree Binary search tree (BST) is a special binary tree: for each parent node, the value of its left child node is less than or equal to the value of the parent node, and the value of its right child node is greater than or equal to the value of the parent node. Therefore, for a binary lookup tree, we can find out ...

Posted by markthien on Thu, 18 Nov 2021 19:53:01 -0800

NOIP-2011-J1-real problem analysis

1, Multiple choice questions 1. B. basic problem, investigate binary operation 2. B, basic question, 48 + 9 = 57 3. C, basic questions, storage space calculation, 8GB/2MB=8*1024/2=4096 4. C, basic questions, basic computer knowledge, Moore's law 5. B. according to the meaning of the question, any two of the seven vertices have exactly one edge ...

Posted by Zomie on Thu, 18 Nov 2021 16:44:31 -0800

Binary tree (primary)

Catalogue of series articles Preorder traversal: Root - > left - > right Middle order traversal: left - > root - > right Post order traversal: left - > right - > root 1, Middle order, pre order and post order traversal Middle order traversal of binary tree: traverse the tree by accessing the left subtree - root nod ...

Posted by LostKID on Thu, 18 Nov 2021 07:33:52 -0800

ACwing Chapter 3 search and graph theory

1, DFS There are two important concepts in DFS: backtracking and pruning When the weight of all edges in the graph is 1, the BFS must find the shortest path When tracing back, we must pay attention to restoring the scene Arrange numbers #include<iostream> using namespace std; const int N = 10; int n; int path[N];//Record all search p ...

Posted by _OwNeD.YoU_ on Thu, 18 Nov 2021 05:30:57 -0800

[title record] - the 45th international undergraduate Programming Competition (ICPC) Asian regional competition (Kunming)

The 45th international undergraduate Programming Competition (ICPC) Asian regional competition (Kunming) We only did H, water.. Author's evaluation and partial solution How to evaluate the ICPC Kunming division in 2021? Partial solution ICPC Kunming travel notes (2021.4.3) B Chessboard upper and lower bounds minimum cost maximum flow ...

Posted by bigbillhill on Thu, 18 Nov 2021 03:20:36 -0800