• + 0 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).

    1. Can anyone point me to an algorithm with better time complexity than this?
    2. 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)