Description
- to implement a few sorting algorithms and to understand their performance.
Requirements • Download the the text @ile magicitems.txt from our web site.
and Notes • Read it line by line into an array.
- Develop your own implementation of selection sort, insertion sort, merge sort, and quick
- Sort using your selection Print the number of comparisons. [10 points]
- Sort using your insertion Print the number of comparisons. [10 points]
- Sort using your merge Print the number of comparisons. [30 points]
- Sort using your quick Print the number of comparisons. [30 points]
- Record your results in a table in your LaTeX Also note the [20 points] asymptotic running time of each sort and explain why it is that way.
Your code must …
- separate structure from
- be professionally formatted yet uniquely yours (show some personality)
- use and demonstrate best
- make me proud to be your
Resources • Insertion sort, merge sort, and quick sort are described in our text in sections 2.1, 2.3, and 7.1 respectively.
Submi5ng In addition to your source code, commit your LaTeX document in both .tex and .pdf forms



