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.
actually.. the problem does not state that the numbers start at 1. thus the value should be the lowest value in the array + i. ( find the lowest value in the array first, to find out where to start counting from)
I have put in a suggestion to have a test case where number 1 is not in the array
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 →
actually.. the problem does not state that the numbers start at 1. thus the value should be the lowest value in the array + i. ( find the lowest value in the array first, to find out where to start counting from)
I have put in a suggestion to have a test case where number 1 is not in the array