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

Method swap

java/Chapter 18/Question18_6/QuestionC.java:15–19  ·  view source on GitHub ↗
(int[] array, int i, int j)

Source from the content-addressed store, hash-verified

13 }
14
15 public static void swap(int[] array, int i, int j) {
16 int t = array[i];
17 array[i] = array[j];
18 array[j] = t;
19 }
20
21 public static boolean validate(int[] array, int left, int right, int pivot, int endLeft) {
22 for (int i = left; i <= endLeft; i++) {

Callers 1

partitionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected