Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' Improve the code and then document it to make it even clearer. Steve McConnell

Binary tree lookup

Language Java | Level Intermediate | Category Algorithms | August 3, 2015 10:36 pm

Algorithm Problem Description

A Binary tree is a tree with two nodes left node, right node and root node . The root node is a top most node in the tree.

Write a program to print all the paths in binary tree using Pre-order traversal.



All Binary Tree Values: 4   8   10   12   14   20   22   

Print all the Tree paths: 
20, 8, 4
20, 8, 12, 10 
20, 8, 12, 14
20, 22



Please login to add comments.