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.
So the algorithm worked but because I had a print statement in there to help me debug it caused a runtime error with no further explanation. Removing that print statement caused it to work:
Minimum Swaps 2
You are viewing a single comment's thread. Return to all comments →
So the algorithm worked but because I had a print statement in there to help me debug it caused a runtime error with no further explanation. Removing that print statement caused it to work:
Breaks but commenting out the print statement works.
HackerRank really needs to clarify certain things. I had to try a lot of things to figure out this was the issue.