Question: Student Name Student ID CS209 Data Structures and Algorithms - Quiz 1/2e Friday, Feb 22, 2019 1. (25 points) Here is an array of five
Student Name Student ID CS209 Data Structures and Algorithms - Quiz 1/2e Friday, Feb 22, 2019 1. (25 points) Here is an array of five integers: 5,3,4,2,1 Please draw this array after EACH iteration of the large loop (outer loop) in a Bubble sort (sorting smallest to largest). (25 points) Here is an array of five integers: 5,3,4,2,1 Please draw this array after EACH iteration of the large loop (outer loop) in a Selection sort (sortin from smallest to largest). 2. 3. (25 points) Here is an array of five integers: 5,3,4,2,1 Please draw this array after EACH iteration of the large loop (outer loop) in an Insertion sort (so from smallest to largest). 4. (25 Points) Give a big-Oh characterization, in terms of n, of the running time of following meth publie static void FindRepeated(int[) anr) int length arr.length; int temp for(int i-O:iclength-I:i++/ outer loop for(int j-0:jclength-1-ij++)/ inner loop temp arrji+1]: arri+1]-arrlil: arrb)-temp; for(int i-0;iclength-1:i++y if(arr[i+1]arrfi System.out,println Repteaded number."*+" ari+)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
