20 lines
438 B
C++
20 lines
438 B
C++
#ifndef CODING_ALGORITHMS_QUICKSORT_H
|
|
#define CODING_ALGORITHMS_QUICKSORT_H
|
|
|
|
#include <vector>
|
|
#include <iterator>
|
|
|
|
namespace c0ding::algorithm {
|
|
class quick {
|
|
public:
|
|
template<class T>
|
|
static void sort(std::vector<T>& list);
|
|
|
|
private:
|
|
template<class T>
|
|
static void _quick(const typename std::vector<T>::iterator& left, const typename std::vector<T>::iterator& right);
|
|
};
|
|
}
|
|
|
|
#endif //CODING_ALGORITHMS_QUICKSORT_H
|