Skip to content

Commit 432b570

Browse files
committed
fix: minor format
1 parent f96e107 commit 432b570

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

java/Sort and Search/SortArrayCountingSort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public int[] sortArrayCountingSort(int[] nums) {
88
// Count occurrences of each element in 'nums'.
99
int[] counts = new int[max + 1];
1010
for (int num : nums) {
11-
counts[num] += 1;
11+
counts[num]++;
1212
}
1313
// Build the sorted array by appending each index 'i' to it a total
1414
// of 'counts[i]' times.

java/Sort and Search/SortArrayQuicksort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private int partition(int[] nums, int left, int right) {
2525
for (int i = left; i < right; i++) {
2626
if (nums[i] < pivot) {
2727
swap(nums, lo, i);
28-
lo += 1;
28+
lo++;
2929
}
3030
}
3131
// After partitioning, 'lo' will be positioned where the pivot should

java/Sort and Search/SortArrayQuicksortOptimized.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private int partition(int[] nums, int left, int right) {
2727
for (int i = left; i < right; i++) {
2828
if (nums[i] < pivot) {
2929
swap(nums, lo, i);
30-
lo += 1;
30+
lo++;
3131
}
3232
}
3333
// After partitioning, 'lo' will be positioned where the pivot should

0 commit comments

Comments
 (0)