An C++ implementation of quick sort using std::list. The code is as follow: #include using namespace std; typedef list ::iterator ITER; void quicksort(list * seq, ITER middle, ITER end){ ITER iter = end; ITER begin = middle; if(middle == end) { return; } else{ --iter; } ITER temp; while(iter != middle){ if(*iter temp = iter; --iter; begin = seq->insert(begin,*temp); seq->erase(temp); } else{ --iter; } } quicksort(seq,begin,middle); quicksort(seq,++middle,end); }
The blog talks about data mining, algorithm, nosql, python ...