May 2018
Intermediate to advanced
328 pages
8h 15m
English
Write a function that, given a pair of random-access iterators to define its lower and upper bounds, sorts the elements of the range using the quicksort algorithm. There should be two overloads of the sort function: one that uses operator< to compare the elements of the range and put them in ascending order, and one that uses a user-defined binary comparison function for comparing the elements.
Read now
Unlock full access