MCPcopy Index your code
hub / github.com/Tiwarishashwat/InterviewCodes / sort

Method sort

MergeSort.java:51–64  ·  view source on GitHub ↗
(int arr[], int l, int r)

Source from the content-addressed store, hash-verified

49 // Main function that sorts arr[l..r] using
50 // merge()
51 void sort(int arr[], int l, int r)
52 {
53 if (l < r) {
54 // Find the middle point
55 int m =l+ (r-l)/2;
56
57 // Sort first and second halves
58 sort(arr, l, m);
59 sort(arr, m + 1, r);
60
61 // Merge the sorted halves
62 merge(arr, l, m, r);
63 }
64 }
65
66 /* A utility function to print array of size n */
67 static void printArray(int arr[])

Callers 10

mainMethod · 0.95
sortPeopleMethod · 0.80
largestNumberMethod · 0.80
arrayRankTransformMethod · 0.80
mergeMethod · 0.80
getMinDiffMethod · 0.80
smallestChairMethod · 0.80
findMinDiffMethod · 0.80

Calls 1

mergeMethod · 0.95

Tested by

no test coverage detected