Created this Repo while Learning Tree Data Structure from one and only Striver
Root-Starting Node
Children-Child of any node is called children they comes below any node.
Leaf-Node without any Children
subtree-node and the beneath guy is the subtree of a node
Ancestor-Grand parent of a node.nodes above any node.
Types Of Binary Tree-
1.Full Binary Tree-Either has 0 or 2 Children
2.Complete Binary Tree-
->All levels are completly Filled except the last level
->the last level has all Nodes in as left as possible.
3.Perfect Binary Tree-all leaf nodes are the same level.
4.Balanced Binary Tree-height of tree can be at max log(n) nodes
5.Degenerate Binary Tree-Skew tree every bode have a single children.
Traversal Techniques-
1.BFS(Breadth First Search)- -> Inorder Traversal.(use Queue and uses iterative approach)
2.DFS(Depth Frist Search)-(mostly implemented using recursion) -> Inorder (left root right) ->Preoder(root left right) ->PostOrder(left right root)