MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / sort

Method sort

src/main/java/com/thealgorithms/sorts/CircleSort.java:8–16  ·  view source on GitHub ↗
(T[] array)

Source from the content-addressed store, hash-verified

6 * @param array The array to be sorted
7 */
8 @Override
9 public <T extends Comparable<T>> T[] sort(T[] array) {
10 if (array.length == 0) {
11 return array;
12 }
13 while (doSort(array, 0, array.length - 1)) {
14 }
15 return array;
16 }
17
18 /**
19 * Recursively sorts the array in a circular manner by comparing elements

Callers

nothing calls this directly

Calls 1

doSortMethod · 0.95

Tested by

no test coverage detected