Back to course home
0% completed
Vote For New Content
Java version break condition "without using any extra space"
Vladimir Surcov
May 1, 2025
This is swap without extra space
public void swap(int arr[], int i, int j) { arr[j] = arr[i] + arr[j]; arr[i] = arr[j] - arr[i]; arr[j] = arr[j] - arr[i]; }
0
0
Comments
Comments
On this page