This document contains 3 questions about algorithms and data structures. Question 1 asks for the asymptotic time complexity of operations on numbers with m and n digits. Question 2 asks about performing different traversals on a sample tree. Part a asks for breadth-first, part b for preorder, part c for post-order, and part d for in-order of a subtree. Question 3 asks to build a binary search tree by inserting keys in order, then delete a node by copying and by merging.
Do them by hand Part II Problem Solving Question 1 (10 points). Wi.pdf
1. Do them by hand Part II: Problem Solving: Question 1 (10 points). With respect to the
programming problem in Part I, What is the tightest asymptotic running time for each of your
operations, expressed in terms of the number of digits for the two operands, m and n, of each
operation? Clearly justify your answer. Question 2. (20 points) Consider the following General
Tree: a. (5 points) Show the breadth first traversal of the above tree. b. (5 points) Show the
preorder traversal of the above tree. c. (5 points) Show the post-order traversal of the above tree.
d. (5 points) Show the in-order traversal of the subtree rooted at node 30 . Question 3. (20 points)
a. (10 points) Construct a BST by inserting the following keys into an empty BST, in order.
15,17,10,2,19,18,14,8,7,16,3,4,11. b. (5 points) Delete the node with value 15 from the resulting
BST tree in part "a." by copying. c. (5 points) Delete the node with value 15 from the resulting
BST tree in part "a." by merging.