MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / swap

Method swap

java/0046-permutations.java:27–31  ·  view source on GitHub ↗
(int[] arr, int a, int b)

Source from the content-addressed store, hash-verified

25 }
26
27 public void swap(int[] arr, int a, int b) {
28 int temp = arr[a];
29 arr[a] = arr[b];
30 arr[b] = temp;
31 }
32}

Callers 1

functionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected