6 Matching Annotations
  1. Nov 2019
  2. Oct 2019
    1. Thus the lessonto be learned is that when designing algorithms that operate on trees, it is important to be most efficienton the bottommost levels of the tree (as BuildHeap is) since that is where most of the weight of the treeresides.
    1. Merge is a recursive operation.
    2. In order to maintain this property, each node has a rank, which indidates the length of the path between the node and the right most leaf. For example,

      Rank - https://en.wikipedia.org/wiki/Leftist_tree#S-value

      Rank of a node, is the distance from that node to the nearest leaf in the subtree rooted at that node.

    3. The relationship of left child and right child is not important, so the two child slots in the array for a root can be fully used. (Can we use array to implement a binary search tree?)
    4. unfortunately we cannot have it in pure functional world where mutable array is not recommended.