Archives

Archives / 2015 / March
  • Binary Tree : Level Order Traversal

    In a binary tree, node level is defined as the number of nodes which are in between the node in context & the root node. If we consider root node is at level 0, then immediate child nodes of root are at level 1 and the subsequent child nodes are level 2 and so on. Thus level order traversal of a binary tre involves processing nodes on the basis of their levels i.e. level 0 nodes are to be processed before nodes at level 1 which are to be processed before nodes which are at level 2 etc. The screenshot below shows a tree and its corresponding level order traversal :

Contact Me

rk.pawan@gmail.com | +1-737-202-7676 | LinkedIn | Facebook | Github |