Skip to content
Snippets Groups Projects
Commit 57429e0a authored by ADAMOU Salim's avatar ADAMOU Salim
Browse files

correction

parent d6111aa0
Branches
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ public class InsertionSort<T extends Comparable<T>> implements Sorter<T> { ...@@ -19,7 +19,7 @@ public class InsertionSort<T extends Comparable<T>> implements Sorter<T> {
T key = sortable.get(i); T key = sortable.get(i);
int j = i - 1; int j = i - 1;
while (j >= 0 && sortable.compare(j, key) > 0) { while (j >= 0 && sortable.compare(j, (Integer) key) > 0) {
sortable.Swap(j + 1, j); sortable.Swap(j + 1, j);
j = j - 1; j = j - 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment