Skip to content

Created this Repo while Learning Tree Data Structure from one and only Striver

Notifications You must be signed in to change notification settings

LearnwithAnkit/Striver-Tree-Series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Striver-Tree-Series

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)

About

Created this Repo while Learning Tree Data Structure from one and only Striver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages