Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Final exam review Spring2007: Binary Trees are Cute

Back to Final Review-Spring 2007

Questions? Answers? Comments?


When we do traversals of trees, are we basically doing a depth-first-search? Like going as far down the left child branch as we can a getting it's left and right, then moving back up the tree? And then doing the same thing for the right branch?

Pre-order: MarkG, REMOVEDel, Brian, Kristen, Derek, MarkS, Sarah, Rory, Ricardo, Sam
Postorder: Brian, Derek, Kristen, REMOVEDel, Ricardo, Rory, Sam, Sarah, MarkS, MarkG
In-order: Brian, Derek, Kristen, REMOVEDel, MarkG, Ricardo, Rory, Sam, Sarah, MarkS


Did the question mean to reinsert the list everytime or are you suppose to do the new order with what you got from the old?


did anyone get this?
Pre-order: MarkG, REMOVEDel, Brian, Derek, Kristin, MarkS, Sarah, Rory, Ricardo, Sam
In-order: Brian, Derek, REMOVEDel, Kristin, MarkG, MarkS, Ricardo, Sam, Rory, Sarah
Post-order: Derek, Brian, Kristin, REMOVEDel, Sam, Ricardo, Rory, Sarah, MarkS, MarkG

in response to the last post, I got the same Pre-order and In-order you did. My Post-order was: Derek, Brian, Kristin, REMOVEDel, Ricardo, SAM, Rory, Sarah, MarkS, MarkG

pre-order: Mark G, REMOVEDel, Brian, Derek, Kristin, mark s, sarah, roy, ricardo, sam
in-order: brian, derek, joel, kristin, mark g,marks, ricardo, roy, sam, sarah
post-order: derek, brian, kristin, joel, ricardo, sam, roy, sarah, mark s, mark g

in my binary tree, sam is the right child of rory, and ricardo is the left chlid of roy. can anyone confirm?



Link to this Page