MCPcopy Create free account
hub / github.com/davidgiven/luje / medChar

Method medChar

lib/java/util/Arrays.java:2648–2655  ·  view source on GitHub ↗
(int a, int b, int c, String[] arr, int id)

Source from the content-addressed store, hash-verified

2646 * returns the median index.
2647 */
2648 private static int medChar(int a, int b, int c, String[] arr, int id) {
2649 int ac = charAt(arr[a], id);
2650 int bc = charAt(arr[b], id);
2651 int cc = charAt(arr[c], id);
2652 return ac < bc ? (bc < cc ? b : (ac < cc ? c : a))
2653 : (bc < cc ? (ac < cc ? a : c) : b);
2654
2655 }
2656
2657 /*
2658 * Returns the char value at the specified index of string or -1 if the

Callers 1

stableStringSortMethod · 0.95

Calls 1

charAtMethod · 0.95

Tested by

no test coverage detected