Difference between revisions of "InsertionSort"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
=Testing= | =Testing= | ||
==Correctness== | ==Correctness== | ||
− | {{TestSuite| | + | {{TestSuite|_InsertionSortedTestSuite|sort.insertion.group}} |
Latest revision as of 22:55, 4 February 2022
Background
Code To Implement
Sorter
class: | Sorter.java | |
methods: | sort | |
package: | sort.core | |
source folder: | student/src/main/java |
Here you will provide the default implementation of the sort method.
default void sort(T[] data, Comparator<T> comparator)
You should simply invoke the sortRange method with the correct arguments.
InsertionSorter
class: | InsertionSorter.java | |
methods: | sortRange | |
package: | sort.insertion.group | |
source folder: | student/src/main/java |
method: public void sortRange(T[] data, Comparator<T> comparator, int min, int maxExclusive)
(sequential implementation only)
Testing
Correctness
class: | _InsertionSortedTestSuite.java | |
package: | sort.insertion.group | |
source folder: | testing/src/test/java |