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

Sign up
Appearance settings

Commit 07b2eb0

Browse files
committed
Formatting changes
1 parent d7a2a80 commit 07b2eb0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

‎src/arrays/QuickSort.java‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ private static int partition_array(int[] arr, int low, int high) {
2828
int j = high;
2929

3030
while (i < j) {
31-
while (arr[i] <= pivot_value && i < high)
32-
{
33-
i++;
34-
}
35-
while (arr[j] > pivot_value) j--;
36-
37-
if (i < j) {
38-
// swap arr[i] and arr[j]
39-
int temp = arr[i];
40-
arr[i] = arr[j];
41-
arr[j] = temp;
42-
}
43-
else {
44-
break;
45-
}
31+
while (arr[i] <= pivot_value && i < high)
32+
{
33+
i++;
34+
}
35+
while (arr[j] > pivot_value) j--;
36+
37+
if (i < j) {
38+
// swap arr[i] and arr[j]
39+
int temp = arr[i];
40+
arr[i] = arr[j];
41+
arr[j] = temp;
42+
}
43+
else {
44+
break;
45+
}
4646
}
4747

4848
arr[low] = arr[j];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /