The goal of this part is to compare and observe how running times of sorting algorithms grow as
the input size (which is the number of elements to be sorted) grows. Since it is not possible to
measure an accurate running time of an algorithm, you will use an elapsed time as an
approximation. How to calculate the elapsed time of an algorithm is described below. You will use four sorting algorithms for this experiment: insertion-sort, merge-sort, quick-sort and heap- sort. A code of insertion-sort, an array-based implementation of merge-sort and an array-based
implementation of quick-sort are given(please see the java.file). You can use these codes, with some
modification if needed, for this assignment. For heap-sort, you need to implement it yourself or you may
use any implementation you can find on the internet or any code written by someone else. If you
use any material (pseudocode or implementation) that is not written by yourself, you must clearly
show the source of the material in your report.
The post How to calculate the elapsed time of an algorithm appeared first on My Assignment Online.