MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / swap

Method swap

Gfg/Java/wave_array.java:14–18  ·  view source on GitHub ↗
(int arr[], int i)

Source from the content-addressed store, hash-verified

12 }
13 //swap alternate elements of array.
14 public void swap(int arr[], int i){
15 int temp = arr[i-1];
16 arr[i-1] = arr[i];
17 arr[i] = temp;
18 }
19
20 public static void main(String args[])
21 {

Callers 2

sortInWaveMethod · 0.95
solveFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected