Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 033b284

Browse filesBrowse files
Update quickSort.h
1 parent 9627ee6 commit 033b284
Copy full SHA for 033b284

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎quickSort.h

Copy file name to clipboardExpand all lines: quickSort.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ int partition(vector <int> &v, int start, int end) {
1313
int j = end;
1414

1515
while (i <= j) {
16-
1716
// Elements smaller than the pivot move to the left side
1817
// and elements bigger that the pivot move to the right side
18+
1919
if (v[i] > v[pivot] && v[j] < v[pivot]) {
2020
swap(v[i], v[j]);
2121
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.