print all the valies of a tree code example
Example: print values of bst java
void printTree(TreeNode node, String prefix)
{
if(node == null) return;
System.out.println(prefix + " + " + node.data);
printTree(node.left , prefix + " ");
printTree(node.right , prefix + " ");
}