Tag:subtree

  • Spark open source new feature: catalyst optimizes process tailoring

    Time:2021-7-28

    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 […]

  • [activities that babies can understand] [30 day leetcoding challenge] day 11

    Time:2021-7-25

    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 […]

  • Leetcode balanced binary tree

    Time:2021-7-18

    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 […]

  • Binary tree (2): Supplement

    Time:2021-7-15

    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 […]

  • Leetcode-0226 flipped binary tree

    Time:2021-7-1

    Title addresshttps://leetcode-cn.com/problems/invert-binary-tree/ 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 […]

  • Tree and binary tree

    Time:2021-6-1

    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 […]

  • The principle of MySQL index, B + tree and several principles of creating index are discussed in detail

    Time:2021-5-11

    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 above-mentioned b-tree index does not indicate B-tree and B + tree index, but the definitions of B-tree and B + tree are different. In mysql, there are four types of […]

  • Tree (exercise class)

    Time:2021-4-2

    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 […]

  • A summary of the basic concepts and properties of tree

    Time:2021-3-22

    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 […]

  • Analysis of internal principle of flutter – key

    Time:2021-3-9

    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 […]

  • JS implementation of binary tree related algorithm – leetcode collation (continuous update)

    Time:2021-2-11

    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); } […]

  • Heap sort and priority queue (C implementation)

    Time:2021-2-4

    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 […]