2010-05-22から1日間の記事一覧
単純にQuicksortのpivot選択をランダムにしただけ。 これで理論上は、O(nlogn)になります。 /* * Rquicksort.h * * Created on: 2010/05/22 */ #include<vector> #include<cstdlib> using namespace std; template<class type> class Rquicksort{ private: void swap(vector<type>& nums, int i,</type></class></cstdlib></vector>…