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.
No way! I came up with the exact same solution. Though, I do admit it was on my second attempt. I did it the boring, slow way first and found out it was too slow. So I had to rethink the solution in terms of keeping track of the differences in values instead of trying to keep track of everything in the array. Good job beating me to it!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
No way! I came up with the exact same solution. Though, I do admit it was on my second attempt. I did it the boring, slow way first and found out it was too slow. So I had to rethink the solution in terms of keeping track of the differences in values instead of trying to keep track of everything in the array. Good job beating me to it!