Answered step by step
Verified Expert Solution
Question
1 Approved Answer
All in C++ 1. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 Show the resulting list after 3 iterations of
All in C++
1. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 Show the resulting list after 3 iterations of selection sort. The first four keys are in order. To move 5 to its proper position using insertion sort, exactly (how many) key comparisons are executed? Justify your answer Using quicksort with middle as the pivot. Show the resulting list after one call to the partition procedure Using sequential search, exactly Using binay search, describe the steps required to search item with key 45 Using hash and linear probing. With hash table size of 10 and hash function is the modulo 10, show the resulting hash table Using hash and quadratic probing. With same hash table size and hash function, show the resulting hash table 2. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 3. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 4. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 5. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 6. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 7. Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 8. Follow the same quadratic probing as above, what is (or what happens to) the resulting hash table "after" we delete item with key 28? 9. (4 pt) Assume the following list of keys: 7, 28, 31, 40, 5, 20, 88 (how many) key comparisons are performed to search item with key 45? Justify your answer. Build a heap and show the resulting heap structure and list. 10. The postfix notation of math expression 3+4*5-67* 8 is The prefix notation of the same expression is 11. Give one scenario that you want to implement queue with link list instead of array. 12. Suppose that you have the following definition of a class. class dummyClass public: void print(); nt listLength; int "list; Write the definition of the copy constructor for the class dummyClass 13. Suppose that head is a pointer to the beginning of a non-empty link list of integers. Write a recursive merge sort recMergeSort function. You can assume other functions by describe its functionality in commentsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started