|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Implementation Details. More...
#include <algorithm>#include <cassert>#include <ctime>#include <iostream>#include <vector>Namespaces | |
| namespace | sorting |
| for working with vectors | |
Functions | |
| template<typename T > | |
| void | sorting::quicksort (std::vector< T > *arr, int32_t low, int32_t high) |
| template<typename T > | |
| std::vector< T > | sorting::quicksort (std::vector< T > arr, int32_t low, int32_t high) |
| static void | test_int () |
| static void | test_double () |
| int | main () |
Implementation Details.
Quick sort 3 works on Dutch National Flag Algorithm The major difference between simple quicksort and quick sort 3 comes in the function partition3 In quick_sort_partition3 we divide the vector/array into 3 parts. quick sort 3 works faster in some cases as compared to simple quicksort.
| int main | ( | void | ) |
Driver program for above functions
|
static |
Test function for double type arrays
|
static |
Test function for integer type arrays