List of utility methods to do Array Swap
void | swap(int arrs[], int i, int j) Swap method, It is used to intechange values into an array. int temp = arrs[i];
arrs[i] = arrs[j];
arrs[j] = temp;
|
void | swap(int i, int j, Integer[] unsorted) swap Integer t = unsorted[i]; unsorted[i] = unsorted[j]; unsorted[j] = t; |
void | swap(int i, int j, String[] index) Method swap. String tmp = index[i]; index[i] = index[j]; index[j] = tmp; |
void | swap(int keys[], int values[], int a, int b) swap int tmp = keys[a];
keys[a] = keys[b];
keys[b] = tmp;
tmp = values[a];
values[a] = values[b];
values[b] = tmp;
|
void | swap(int[] a, int first, int second) swap if (first == second) { return; int temp = a[first]; a[first] = a[second]; a[second] = temp; |
void | swap(int[] a, int i, int j) Swap ith element in a with jth element. int temp = a[i];
a[i] = a[j];
a[j] = temp;
|
void | swap(int[] arr, int a, int b) Swaps two elements of an array. int temp = arr[a];
arr[a] = arr[b];
arr[b] = temp;
|
void | swap(int[] arr, int a, int b) swap int t = arr[a];
arr[a] = arr[b];
arr[b] = t;
|
void | swap(int[] arr, int a, int b, int c, int d, int key) swap int temp; switch (key) { case 0: temp = arr[d]; arr[d] = arr[c]; arr[c] = arr[b]; arr[b] = arr[a]; arr[a] = temp; ... |
void | swap(int[] arr, int i, int j) swap int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
|