基础算法
二分查找
1 | int binarySearch_leftopen_rightclose_duplicate_uper(vector<int> v, int x){ |
快排
1 | int partition(vector<int> &v, int lo, int hi){ |
归并
1 | void mergeV(vector<int> &v, int lo, int mid, int hi){ |
DFS
1 | void cdfs(vector<int> &cur, set<vector<int>> &res, vector<int> &visit, vector<int> &v, int dep, int len, int sum, int vdx){ |