File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/thealgorithms/sorts Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public <T extends Comparable<T>> T[] sort(T[] array) {
1515 }
1616
1717 for (int currentSize = 0 ; currentSize < array .length ; currentSize ++) {
18- int maxIndex = findMaxIndex (array , currentSize );
18+ int maxIndex = findIndexOfMax (array , currentSize );
1919 SortUtils .flip (array , maxIndex , array .length - 1 - currentSize );
2020 }
2121
@@ -30,7 +30,7 @@ public <T extends Comparable<T>> T[] sort(T[] array) {
3030 * @param <T> the type of elements in the array
3131 * @return the index of the maximum element
3232 */
33- private <T extends Comparable <T >> int findMaxIndex (T [] array , int currentSize ) {
33+ private <T extends Comparable <T >> int findIndexOfMax (T [] array , int currentSize ) {
3434 T max = array [0 ];
3535 int maxIndex = 0 ;
3636 for (int i = 0 ; i < array .length - currentSize ; i ++) {
You can’t perform that action at this time.
0 commit comments