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

Method sort

src/main/java/com/thealgorithms/sorts/BogoSort.java:32–37  ·  view source on GitHub ↗
(T[] array)

Source from the content-addressed store, hash-verified

30 }
31
32 public <T extends Comparable<T>> T[] sort(T[] array) {
33 while (!isSorted(array)) {
34 nextPermutation(array);
35 }
36 return array;
37 }
38
39 // Driver Program
40 public static void main(String[] args) {

Callers 1

mainMethod · 0.95

Calls 2

isSortedMethod · 0.95
nextPermutationMethod · 0.95

Tested by

no test coverage detected