notes

Personal notes
git clone git://git.laack.co/notes.git
Log | Files | Refs

BinaryTree.md (615B)


      1 # Binary Tree
      2 
      3 CS202 L14
      4 
      5 **Definition:** For any node n, all elements in the left subtree are less than the current node and everything in the right subtree is greater than the current node. 
      6 
      7 For a generic binary tree, there is no necessitation that the left a right trees are in any way balanced.
      8 
      9 A balanced binary tree has search time complexity of logn. 
     10 
     11 ## Datastructure Specifics
     12 
     13 Depth - Number of edges from the current node to the root of the tree
     14 
     15 Height - Number of edges for the longest downward path
     16 
     17 Subtree - A tree that is defined as subtree(a) where each node below a is included in the subtree