Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java returning an comparable array of inorder traversal of binary tree

TreeNode tree  // this is your tree you want to traverse
E[] array = new E[tree.size];  // the arrays length must be equivalent to the number of Nodes in the tree
int index = 0; // when adding something to the array we need an index
inOrder(tree, array, index);  // thats the call for the method you'll create
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #returning #comparable #array #inorder #traversal #binary #tree
ADD COMMENT
Topic
Name
8+3 =