Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 4: Running Time Analyvis and NP leteness a4 points) a standard (not necessa

ID: 3571637 • Letter: P

Question

Part 4: Running Time Analyvis and NP leteness a4 points) a standard (not necessarily 41. apo What is the worst case runtime of successful fi balanced) BST containing N nodes? select the sINGLE A. O(l) C. OCN) Aa2.ap0 Which of the data structures has the fastest worst-case nuntime for inserting an element? In all cases assume that you do check for duplicates when you insert. Select the N SINGLE best answer. A. Sorted array B. Hash table using separate chaining C. Skip list D. Red black tree 43 po Which of the following are considered greedy algorithms". Select all that apply. A. Prim's algorithm B. Kruskal s algorithm C. Huffman's algorithm 44 upo You have been given a set of keys to insert into a multi-way trie (MWT. Which of the following would you expect to produce a shallower MWT? Select the SINGLE best answer. A. Inserting the keys in sorted order B. Inserting the keys in random order c. Both will produce a MwT of the same height 4s.upo In our analysis of average case time for a successful find in a BST with N nodes, we made an SINGLE best helped us over all BST shapes. Which assumption was this? Select anwer average possible A All are equally to be searched the B. The keys likely for keys would never be inserted in sorted order c The of the subtree always within of the height the right subtree for all nodes 1 in height left was the tree. D orders are equally of likely

Explanation / Answer

4.1) B because we are slicing the tree into half every time.

4.2) B

4.3) All the options are greedy algortihms because they find local optimal solution rather than global optimal.

4.4) C

4.5) C

4.6) B

4.7) F