MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / swap

Method swap

Java/Array/Sort012.java:63–70  ·  view source on GitHub ↗
(int [] arr, int i, int j)

Source from the content-addressed store, hash-verified

61 return arr;
62 }
63 public static void swap(int [] arr, int i, int j) {
64 // i = number to be swapped.
65 // j = number with which it is swapped.
66
67 int temp = arr[i];
68 arr[i] = arr[j];
69 arr[j] = temp;
70 }
71
72
73 public static int [] sort012threePointerApproach(int [] arr) {

Callers 2

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected