Skip to content

Commit 1f5e188

Browse files
author
alxklm
committed
checkstyle: fix formatting
1 parent 33b0cc7 commit 1f5e188

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/thealgorithms/sorts/PancakeSort.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public <T extends Comparable<T>> T[] sort(T[] array) {
1414
return array;
1515
}
1616

17-
for (int currentSize = 0; currentSize < array.length; currentSize++) {
17+
for (int currentSize = 0; currentSize < array.length; currentSize++) {
1818
int maxIndex = findMaxIndex(array, currentSize);
19-
SortUtils.flip(array, maxIndex, array.length - 1 - currentSize );
19+
SortUtils.flip(array, maxIndex, array.length - 1 - currentSize);
2020
}
2121

2222
return array;
@@ -32,13 +32,13 @@ public <T extends Comparable<T>> T[] sort(T[] array) {
3232
*/
3333
private <T extends Comparable<T>> int findMaxIndex(T[] array, int currentSize) {
3434
T max = array[0];
35-
int maxIndex = 0;
35+
int maxIndex = 0;
3636
for (int i = 0; i < array.length - currentSize; i++) {
3737
if (SortUtils.less(max, array[i])) {
3838
max = array[i];
39-
maxIndex = i;
39+
maxIndex = i;
4040
}
4141
}
42-
return maxIndex ;
42+
return maxIndex;
4343
}
4444
}

0 commit comments

Comments
 (0)