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.
Was having the same problem (for me both in cases 7 and 8) - I even tried c instead of python, but no dice.
I finally made it, now all tests work. I don't want to spoil your fun, but let me just say this: if your problem is the same I had, no amount of cheap optimization tricks will save you - instead, you might want to work out on paper what your algorithm is doing on a longish example, that was what eventually clued me in (in retrospect, I should have tried that a lot earlier)...
Good luck!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Was having the same problem (for me both in cases 7 and 8) - I even tried c instead of python, but no dice.
I finally made it, now all tests work. I don't want to spoil your fun, but let me just say this: if your problem is the same I had, no amount of cheap optimization tricks will save you - instead, you might want to work out on paper what your algorithm is doing on a longish example, that was what eventually clued me in (in retrospect, I should have tried that a lot earlier)...
Good luck!