Traversals Preorder (N L R): 7 2 6 5 11 Inorder (L N R): 2 7 5 6 11 Postorder (L R N): 2 5 11 6 7 Read N L R as “first visit node, then visit left subtree, then vision right subtree” Go to “Quizzes/Tests” section of Sakai and find today’s classwork – fill it out
Onward! Go to the TreeNodeExample code from Monday’s class Try to write: 1.An iterative version of containsNode that assumes the tree is a binary search tree 2.An iterative version of containsNode that does not assume the tree is a binary search tree (hint: you’ll want a stack or queue)
How do we compute the Big O of recursive functions?
Solve the problems in RecurrenceRelationProblems.java A. B. C. D. E.
Your consent to our cookies if you continue to use this website.