Test #1 questions. Two questions from the following ones will be given on the test, plus 5 - 6 practical problems (such as, define the efficiency of a program fragment, trace a data structure, etc.) 1. Explain why it is important to know the run time efficiency of algorithms, and how this knowledge helps us decide which algorithm is the best for a given application. Define the big-O notation and explain how well it allows us to classify algorithms from a real- world perspective. Give some peculiar examples to show the potential problems. 2. Explain and compare selection, insertion and bubble sorts. Assume that your application (say a data base application) deals with large records where comparisons are performed by means of integer keys. Assume also that your application requires a stable sorting method, i.e. a method that does not change the relative ordering of elements that are equal. Which of these sorting methods would you choose, and why? (Hint: consider sorting based on the following integer keys 19, 14(1), 7, 12, 14(2), 10) 3. Describe the divide-and-conquer search algorithm and explain its efficiency. Consider two different Split functions: Split = Lo, and Split = (Lo + Hi) / 2. Draw the trees of recursive calls. Assume that we are searching a large data base with 4 million items represented as an ordered array. How many probes into the list will the binary search require before finding the target or concluding that it cannot be found? Assume that it takes 1 microsecond to access an item, estimate the execution time of the binary search. 4. Explain how the efficiency of recursive algorithms is defined. Consider two examples: the recursive binary search, and the tower of Hanoi problem. Draw the tree of recursive calls for both problems, and compare their efficiencies. 5. Describe Shell sort (example is always helpful). What advantage do the relatively prime values of the increments have over other values? Provide examples of best case and worst case data sets for Shell sort, and compare its efficiency in these cases to the best case and worst case efficiency of Quick sort. 6. Describe and compare Quick sort and Merge sort. How important is the choice of the pivot in Quick sort? Using trees of recursive calls, analyze and compare best and worst case efficiencies of Quick and Merge sorts. 7. What is an Abstract Data Type and what is a data structure? Explain the levels of abstraction in the data specification. Consider the Matrix ADT example to illustrate your explanation. 8. Describe the Queue ADT (give a definition, set of operations). Explain and compare array and linked list implementations of the Queue ADT. Explain how queues are used in the Radix sort, and explain the Radix sort itself. Discuss the efficiency of the Radix sort. 9. Describe the Stack ADT (give a definition, set of operations). Explain and compare array and linked list implementations of the Stack ADT.Describe one stack application -- your choice.Suggestions: converting expressions from infix to postfix form, evaluation of arithmetic or logical expressions, using stacks in Java Virtual Machine. 10. Describe the List ADT (give a definition, set of operations). Describe different versions of the List ADT (ordered, unordered) and their implementations (array implementation, linked list implementation and doubly linked list implementation). Define the Double-Ended Queue ADT. 11. Describe the Ranked Sequence ADT (give a definition, set of operations). Compare the array-based and the doubly linked list implementation of the Ranked Sequence ADT (in details for each operation). 12. Describe the Positional Sequence ADT (give a definition, set of operations). Explain the notion of a position. Explain how Positional Sequence ADT is different from Ranked Sequence ADT. NOTE: Your answer must be specific, detailed, include example, pseudocode where appropriate.