

Analyze the given array and determine what sorting algorithms would be best for the lowest possible time complexity. If the runtime complexity is the same, consider the number of swaps and comparisons in your solution. Provide an explanation for your answer. 3.1) (2pts) Given this array arr, would it be better to use bubble sort, heap sort, or quick sort? arr ={1,2,3,4,5,6,7,8,9,10} 3.2) (2pts) Given this array arr, would it be better to use quick sort, insertion sort, merge sort, or selection sort? arr ={0,0,0,0,0,0,0,0,0,0,0,0,0} 3.3) (3pts) Given this array arr, would it be better to use insertion sort, bubble sort, or selection sort? Explain in terms of comparisons and the variable n which represents the length of the array. arr={10,9,8,7,6,5,4,3,2,1} 3.4) (3pts) Given this starting state and intermediate state, which sorting algorithm(s) should be used to obtain the intermediate state and explain your reasoning. The possible sorting algorithms are: Merge, Quick, Insertion, Selection, Bubble, and Heap.
Starting state: arr={8,4,12,2,10,6,20,25,15} Intermediate state: arr={2,4,6,8,10,12,20,25,15}