Question: 1. If constructing a binary search tree using the inserting sequence {4, 1, 8, 9, 6, 3, 2, 7}, where 7 goes? A. Right subtree
1. If constructing a binary search tree using the inserting sequence {4, 1, 8, 9, 6, 3, 2, 7}, where 7 goes?
A. Right subtree of 2. B. Left subtree of 9 C. Right subtree of 6 D. Left subtree of 8
2. i is the event number, s(i) is the start time for event i, f(i) is the finish time.
Which set is NOT a Maximum-size mutually compatible set?
A. {1, 2, 4, 7} B. {1, 2, 4, 8} C. {1, 2, 6, 8} D. {1, 2, 6, 9}
3. Which data structure has the worst case for searching O(log N), insertion O(log N), and deletion O(log N)? A. Array B. Linked List C. Binary Tree D. Balanced Tree
4.The directed graph: V={V0,V1, V2,V3,V4,V5,V6}. There are the following twelve edges, with edge costs listed as the third item in the triplet: E={ (V0,V2,4), (V1,V0,2), (V1,V3,3), (V3,V0,1), (V3,V2,2), (V3,V5,8), (V3,V6,4), (V4,V1,10), (V4,V3,2), (V4,V6,7), (V5,V2,2), (V6,V5,1)}. If the start vertex is V4, then using the depth-first-search, which is the last vertex to be marked (visited)?
| A. V2 B. V3 C. V5 D. V6 |
| 5. Which is NOT a feature of Dynamic Programming? A. Dynamic programming is used to avoid calculating the same thing twice B. Dynamic programming solves problem bottom-up C. Dynamic programming doesnt really refer to computer programming D. Dynamic programming is one method of divide-and-conquer, solve problem by combining the solutions to subproblems. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
