728x90 Computer Science21 Quick - Sort Algorithm 미완성 설명 필요 #include using namespace std; int a[1000000]; void swap(int &x, int &y) { int z = x; x = y; y = z; } int choosePivot(int low, int high) { //return low + (high - low) / 2; return high; } int partition(int low, int high) { int pivotIndex = choosePivot(low, high); int pivotValue = a[pivotIndex]; swap(a[pivotIndex], a[high]); int storeIndex = low; for (int i = low; i> n; for (int i = 0; i>.. 2019. 5. 30. 이전 1 ··· 3 4 5 6 다음 반응형