Skip to content

Latest commit

 

History

History

Find All Root to Leaf Paths

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Given a binary tree, print all its root to leaf paths without using recursion. For example, consider the following Binary Tree.

        6
     /    \
    3      5
  /   \     \
 2     5     4
     /   \
    7     4

There are 4 leaves, hence 4 root to leaf paths -
  6->3->2              
  6->3->5->7
  6->3->5->4
  6->5>4