Tag：subtree

Time：2021728
Summary:In order to solve the problem of relying too much on hive, sparksql uses a new SQL optimizer to replace the optimizer in hive, which is catalyst. This article is shared from Huawei cloud community《Spark open source new feature: catalyst optimizes process tailoring》, author: hzjturbo. 1. Problem background The figure above shows the layout of […]

Time：2021725
Diameter of binary tree Hi, everyone, I’m Zhang Xiaozhu. Welcome to the special article of the “baby can understand” series – the official activity “30 day leetcoding challenge”. Here is the question of April 11 and the 543rd question in the list – “diameter of binary tree” Title Description Given a binary tree, you need […]

Time：2021718
Title: input the root node of a binary tree to determine whether the tree is a balanced binary tree. If the depth difference between the left and right subtrees of any node in a binary tree is less than 1, then it is a balanced binary tree. Thinking:Use an auxiliary function to calculate the depth […]

Time：2021715
Symmetric binary tree Create a function to determine whether a binary tree is symmetric As shown in the figure, this is a symmetric binary tree Note that this is not a symmetric binary tree Idea: start from the root node, compare its left subtree and right subtree nodes, and then recurse successively. As long as […]

Time：202171
Title addresshttps://leetcodecn.com/problems/invertbinarytree/ 1. Recursion Time complexity O (n) space complexity O (n)The idea of recursion is to find the termination condition of recursion. The termination condition of recursion can only end recursion if the current node is null. Or we can think about it from another perspective. If this node is not null, it may […]

Time：202161
The concept of tree Family relations of similar people definition content node The stored data elements and the branches to the subtree Degree of node Number of subtrees of nodes leaf Nodes with degree 0 Children (parents) Direct successor (direct precursor) brother Children of the same node ancestors Root to all nodes on the node […]

Time：2021511
If we don’t do what we should do today, we will be delayed no matter how early tomorrow. 1、 Comparison of storage engines Note: the abovementioned btree index does not indicate Btree and B + tree index, but the definitions of Btree and B + tree are different. In mysql, there are four types of […]

Time：202142
Huffman tree In a tree, all nodes from one node to another are called paths between two nodes. In the above binary tree, the path from root node a to leaf node h is a, B, D and H. In a tree, the number of “edges” passing from one node to another is called the […]

Time：2021322
Tree is an important kind of nonlinear data structure. This paper introduces the basic concepts, terms and properties of trees. 1、 Basic concepts and terms of trees Trees can be seen everywhere in life Trees have many characteristics: there is a root, the root can be divided into trunk, trunk can be divided into many […]

Time：202139
The original text is inhere. This article is a summary of the tubing video. The video address ishere。 Basically, every widget has a key parameter, but the methods used are different. When a widget moves from one place in the widget tree to another, the key saves the state. In practice, the key can be […]

Time：2021211
Binary tree Before that, let’s review the creation and basic methods of binary search treeMaster the following code, will be able to skillfully binary tree further operation var Node=function(key){ this.key=key; this.left=null; this.right=null; } class BinaryTree{ constructor(){ this.root=null; } //Insert node (as required by binary search tree) insert(key){ let newNode=new Node(key); if(this.root==null){ this.root=newNode; }else{ this.insertNode(this.root,newNode); } […]

Time：202124
1. Binary reactor 1.1 reactor introduction binary heap is a complete binary tree, which is divided into maximum heap and minimum heap. stayMaximum heapIn, the value of the parent node is greater than or equal to the value of its left and right child nodesThe value of the root node in the max heap […]