Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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 + " ");
 }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #values #bst #java
ADD COMMENT
Topic
Name
8+7 =