MCPcopy Create free account
hub / github.com/Seogeurim/CS-study / swap

Method swap

contents/algorithm/code/QuickSort.java:37–41  ·  view source on GitHub ↗
(int[] arr, int i, int j)

Source from the content-addressed store, hash-verified

35 }
36
37 static void swap(int[] arr, int i, int j) {
38 int temp = arr[j];
39 arr[j] = arr[i];
40 arr[i] = temp;
41 }
42
43 public static void main(String[] args) {
44 int[] arr = { 3, 7, 6, 5, 1, 4, 2 };

Callers 1

partitionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected