Class DirectInsertion
java.lang.Object
topics.sorting.DirectInsertion
- All Implemented Interfaces:
ISortingAlgorithm
Sorting algorithm: Direct insertion method
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DirectInsertion
public DirectInsertion()
-
-
Method Details
-
sort
public void sort(int[] elements) Description copied from interface:ISortingAlgorithmSorts elements without tracing anything- Specified by:
sortin interfaceISortingAlgorithm- Parameters:
elements- Array of numbers to be sorted
-
sort
public void sort(int[] elements, boolean trace) Description copied from interface:ISortingAlgorithmSorts elements with the possibility of tracing the operation- Specified by:
sortin interfaceISortingAlgorithm- Parameters:
elements- Array of numbers to be sortedtrace- Whether to trace the operation performed
-