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.
For anyone struggling with the last test case and getting overflow: you might have to use a 64-bit integer to hold the super digit value, even if you choose to return a 32-bit integer at the end:
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
For anyone struggling with the last test case and getting overflow: you might have to use a 64-bit integer to hold the super digit value, even if you choose to return a 32-bit integer at the end: