ll that the running Buts1ze time of pdequeuel) is O(n) and its memory requiremen
ID: 3906016 • Letter: L
Question
ll that the running Buts1ze time of pdequeuel) is O(n) and its memory requirement is Ol) 3. Binary Search Trees Consider the following binary search tree 37 24 12 32 10 48 72 (a) (2) Write the sequence of nodes visited in an in-onder traversal of the binary search tree. (b) (2) Write the sequence of nodes visited in a pre-order traversal of the binary search tree. (o) (2) Write the sequence of nodes visited in a post.-onder traversal of the binary search tr. (d) (2) Write the sequence of nodes visited in a level-onder traversal of the binary search tree. (e) (2) Draw a figure of the array implementation of this binary search tree. What is the minimum size array which is required to represent this tree?Explanation / Answer
in-order: --------- 2, 7, 22, 24, 32, 37, 40, 42, 48, 55, 72 pre-order: ---------- 37, 24, 7, 2, 22, 32, 42, 40, 55, 48, 72 post-order: ----------- 2, 22, 7, 32, 24, 40, 48, 72, 55, 42, 37 level-order: ------------ 37, 24, 42, 7, 32, 40, 55, 2, 22, 48, 72
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.