test_quick_sort.cpp

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 #include <deque>
00007 #include <iostream>
00008 #include <iterator>
00009 #include <stdlib.h>
00010 
00011 #include "stable_quick_sort.h"
00012 
00013 using namespace std;
00014 
00015 int main() {
00016   deque<int> data, sorted_data;
00017   int i, j;
00018 
00019   for (i=0; i<20; ++i) {
00020     j = rand() % 10;
00021     data.push_back( j);
00022   }
00023 
00024   stable_quick_sort<int, deque<int> >( data, sorted_data);
00025 
00026   copy( sorted_data.begin(), sorted_data.end(), ostream_iterator<int>( cout, " "));
00027 
00028   return 0;
00029 }

Generated on Fri Jan 7 12:36:18 2011 for public_options by  doxygen 1.5.1