"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

December 23, 2009

Trees – Revisited

  • A Tree with N Nodes has N-1 Edges
  • Nodes with No Children are called leaves
  • Depth for Node N – Length of Unique path from Root to Node N. Root is of depth 0
  • Height of the root is equal to height of the tree



  • For above tree Height is 3. E is at Depth 1
  • Binary Tree – No node can have more than two children
  • AVL Tree is identical to BST. Height of left and right subtree differ by 1
  • Tree Traverals - Depth First Traversals of Binary Trees
 I need to catch up with good problem set I learnt from Algorithmica. 8 Queen Problem Analysis I will do it soon.

More Reads

No comments: