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.
I've got a recursive solution with worst case (i.e. requirements = [[0,1]]) O(10**(m-1)) that passes all but 4 of the test cases (1, 3, 6 & 7).
Can anyone point me to an algorithm with better time complexity than this?
Has anyone figured out a strategy to memoize tail digit runs? This has proven remarkably difficult in the cases where the loop min iterator value depends on a digit much farther back in the digits (i.e. [0,m-1] is a requirement)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Requirement
You are viewing a single comment's thread. Return to all comments →
I've got a recursive solution with worst case (i.e. requirements = [[0,1]]) O(10**(m-1)) that passes all but 4 of the test cases (1, 3, 6 & 7).