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.
Oh ok, my bad. I just wonder, even if the array is sorted what logic shoule be used to move indexes.. for example [0 2 3 4 5 6], how do I get to
2, 5 for 7 AND
0, 4 for 4
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
Oh ok, my bad. I just wonder, even if the array is sorted what logic shoule be used to move indexes.. for example [0 2 3 4 5 6], how do I get to 2, 5 for 7 AND 0, 4 for 4