Pure Programmer
Blue Matrix


Cluster Map

Project: Quicksort

The [[Quicksort]] one of the most efficient sorts. It was first introduced by [[Tony Hoare]] in 1959. It can be implemented very easily using recursion. Write a function that takes a list of integers and sorts the list, in place, using a Quicksort. Test the function by creating a random list of integers, print the random list, sort the list, then print out the sorted list. Accept the number of integers to put in the list and the maximum integer to randomly generate on the command line. What is the worst case performance of the Quicksort?

Output
$ swiftc Quicksort.swift -I . -L . -lUtils error: link command failed with exit code 1 (use -v to see invocation) ld: library not found for -lUtils clang: error: linker command failed with exit code 1 (use -v to see invocation) $ swiftc Quicksort.swift -I . -L . -lUtils error: link command failed with exit code 1 (use -v to see invocation) ld: library not found for -lUtils clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution