Question: Q4: [10 Points] 1- Use the random number generator to generate 1000 random integer values. Use these 1000 integers to create 3 arrays. 2- Modify
![Q4: [10 Points] 1- Use the random number generator to generate](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f50f61e3c04_28966f50f61550fb.jpg)
Q4: [10 Points] 1- Use the random number generator to generate 1000 random integer values. Use these 1000 integers to create 3 arrays. 2- Modify the bubble sort algorithm by adding a counter to count how many times the elements of the array changed value (swapping is considered as a one change) 3- For each array, apply the modified bubble sort algorithms and save the counter value. 4- Repeat step 1 to 4, using shell sort algorithm, quick sort algorithm and merge sort algorithm. Use the results to complete the table below: 1st array counter 2nd array counter array counter Bubble sort 3rd Shell sort Quick sort Merge sort Q4: [10 Points] 1- Use the random number generator to generate 1000 random integer values. Use these 1000 integers to create 3 arrays. 2- Modify the bubble sort algorithm by adding a counter to count how many times the elements of the array changed value (swapping is considered as a one change) 3- For each array, apply the modified bubble sort algorithms and save the counter value. 4- Repeat step 1 to 4, using shell sort algorithm, quick sort algorithm and merge sort algorithm. Use the results to complete the table below: 1st array counter 2nd array counter array counter Bubble sort 3rd Shell sort Quick sort Merge sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
