Question
can somone please give me an answer to these please a. Designing a class named SortingAlgorithms with a main method. (5 marks) b. Implementing a
can somone please give me an answer to these please
a. Designing a class named SortingAlgorithms with a main method. (5 marks)
b. Implementing a static method bubbleSort that takes an array and its size and sorts the array using bubble sort algorithm. (5 marks)
c. Implementing a static method selectionSort that takes an array and its size and sorts the array using selection sort algorithm. (5 marks) d. Implement a static method insertionSort that takes an array and its size and sorts the array using insertion sort algorithm. (5 marks) e. In the main method, generate random arrays of different sizes, 100, 1000, 5000, 10000, etc. (5 marks)
f. Call ingeach of the aforementioned sorting algorithms to sort these random arrays. You need to measure the execution time of each and take a note. (10 marks)
g. Prepareing a table of execution times and write a short report to compare the performance of these three sorting algorithms.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started