Remove duplicate SimpleSort (same logic as ExchangeSort) (#6441)

* Remove duplicate SimpleSort (same logic as ExchangeSort)

* Removed test class for SimpleSort as it was also duplicate

---------

Co-authored-by: Lucas G <lucasgomesm1808@gmail.com>
This commit is contained in:
Lucas Gomes
2025-07-26 05:34:00 -03:00
committed by GitHub
parent 032f75c0f4
commit 2eb80fb843
2 changed files with 0 additions and 23 deletions

View File

@@ -1,15 +0,0 @@
package com.thealgorithms.sorts;
public class SimpleSort implements SortAlgorithm {
@Override
public <T extends Comparable<T>> T[] sort(T[] array) {
for (int i = 0; i < array.length; i++) {
for (int j = i + 1; j < array.length; j++) {
if (SortUtils.less(array[j], array[i])) {
SortUtils.swap(array, i, j);
}
}
}
return array;
}
}