educative.io

Swap function is missing

Hi,

I don’t see details of the function “swap(arr[i], arr[j])”. Can you send me here?

Hi Ashu,

Here you go:

void swap(int & a, int & b){
int temp = a;
a = b;
b = temp;
}