You are viewing a single comment's thread. Return to all comments →
Thanks for the help! Your solution is really nice! I have one suggestion.
let minValue = Math.min(...arr);
This can be changed to 1. Because it is said in the task description that arr[i] can be minimum 1.
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 →
Thanks for the help! Your solution is really nice! I have one suggestion.
This can be changed to 1. Because it is said in the task description that arr[i] can be minimum 1.