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.
What was tripping me up was some of the tests use really long strings and my first (few) solution timed out.
My working hack was to test if the input string was longer than an integer. If not run normally, and if so, break the string into integer sized bites...
it passes now but could be rewritten to be shorter likely.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
Finally solved this one in Java.
What was tripping me up was some of the tests use really long strings and my first (few) solution timed out.
My working hack was to test if the input string was longer than an integer. If not run normally, and if so, break the string into integer sized bites...
it passes now but could be rewritten to be shorter likely.