Question: 1. Short Questions a) Given 1024 data in reverse order (from highest to lowest) You are trying to sort from lowest to highest. Which algorithm
1. Short Questions a) Given 1024 data in reverse order (from highest to lowest) You are trying to sort from lowest to highest. Which algorithm will be best suited and what will be the order of runtime. b) Given the following three data set having the same numbers 5, 10, 15, 20, 25, 30, 35, 40 40, 35, 30, 25, 20, 15, 10,5 30, 15, 5, 40, 20, 10, 35, 25 Which arrangement will be quicker to sort, if you are using Selection Sort to sort them? Give explanation. c) Given the following keys: 40, 15, 27, 10, 5, 12, 26 Is this a Max Heap? Draw the Heap, and answer. d) Given the following three data set having the same numbers. iv) 5, 10, 15, 20, 25, 30, 35, 40 v) 40, 35, 30, 25, 20, 15, 10,5 vi) 30, 15, 5, 40, 20, 10, 35, 25 Which arrangement will be slower to sort (i.e. more runtime), if you are using Insertion Sort to sort them? Give explanation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
