You are viewing a single comment's thread. Return to all comments →
Please explain this section of the code. I really don't understand it.
int temp = arr[arr[first] - 1]; arr[arr[first] - 1] = arr[first]; arr[first] = temp;
int temp = arr[arr[first] - 1];
arr[arr[first] - 1] = arr[first];
arr[first] = temp;
Thank you so much.
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Swaps 2
You are viewing a single comment's thread. Return to all comments →
Please explain this section of the code. I really don't understand it.
int temp = arr[arr[first] - 1];
arr[arr[first] - 1] = arr[first];
arr[first] = temp;
Thank you so much.