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.
Bonjour,
for me it is an error on the test not on the code
if you read the description, numbers have to be consecutive
Constraints: 1<=arr[i]<=n
in that case n=7 so 8 it a non case
Cookie support is required to access HackerRank
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 →
Bonjour, for me it is an error on the test not on the code if you read the description, numbers have to be consecutive Constraints: 1<=arr[i]<=n in that case n=7 so 8 it a non case