Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rapalli Nikhil
Tree3
0 Answer(s)      3 years and 8 months ago
Posted in : Java Beginners


Include a method that will print the depth-first traversal of a tree (choosing left branches first). public void printDepthFirst() { ... } For example, for the tree

                                              t =                     3
                                                                   /          \
                                                                  /             \
                                                                 4               5
                                                             /        \       /        \
                                                             6         7      8        9

the call t.printDepthFirst(); should print 3 4 6 7 5 8 9


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Tree3
Tree3  Include a method that will print the depth-first traversal of a tree (choosing left branches first). public void printDepthFirst() { ... } For example, for the tree
Tree3
Tree3  Include a method that will print the depth-first traversal of a tree (choosing left branches first). public void printDepthFirst() { ... } For example, for the tree
Advertisements
Advertisements
 

 

 

DMCA.com