Comparing the runtimes of 2 different Quicksort implementations.
-
Run
quicksort_swap.py, this will saveswap.csvwhich contains the runtimes for 10,000 lists of length 1 to 1000 sorted using the quicksort method in 'Algorithms' by Jeff Erickson. -
Run
quicksort_segment.py, this will savesegment.csvwhich contains the runtimes of 100,000 lists of length 1 to 1000 sorted using the quicksort method as taught by Prof. Tseng of Clark University. -
Run
graph.pythis will produce and savefig.pngwhich graphs the mean runtimes of each quicksort by the size of the input along side the theoretical runtime of$\cal{O}(n \log(n))$ .