MCPcopy Index your code
hub / github.com/careercup/ctci / getSortedArray

Method getSortedArray

java/Chapter 9/Question9_3/QuestionB.java:46–50  ·  view source on GitHub ↗
(int size)

Source from the content-addressed store, hash-verified

44
45 /* Creates an array that is sorted */
46 public static int[] getSortedArray(int size) {
47 int[] array = AssortedMethods.randomArray(size, -1 * size, size);
48 Arrays.sort(array);
49 return array;
50 }
51
52 public static void main(String[] args) {
53 for (int i = 0; i < 1000; i++) {

Callers 1

mainMethod · 0.95

Calls 2

randomArrayMethod · 0.95
sortMethod · 0.45

Tested by

no test coverage detected