We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Why the above code is not passing all test cases?
this code simple checks the index of element with the rank after sorting and if it don't matches with the rank just find the element with index of the rank and swap the index values of both
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lily's Homework
You are viewing a single comment's thread. Return to all comments →
Why the above code is not passing all test cases? this code simple checks the index of element with the rank after sorting and if it don't matches with the rank just find the element with index of the rank and swap the index values of both