Computer Science, asked by Guransh3936, 1 year ago

Write a program that creates three identical arrays, list1, list2, and list3 of 5000 elements. the program then sorts list1 using bubble sort, list2 using selection sort, and list3 using insertion sort and outputs the number of comparisons and item assignments made by each sorting algorithm.

Answers

Answered by himanshusingh52
0
Write a program that creates three identical arrays, list1, list2, and list3, of 5000 elements. The program then sorts list1 using bubble sort, list2 using selection sort, and list3 using insertion sort and outputs the number of comparisons and item assignments made by each sorting algorithm. * Hint: Using rand() function, fill all 5000 integer elements of the list1, and then copy it to list2 and list3
Similar questions