https://www.hackerrank.com/contests/dyuthi-game-of-codes-2/challenges/nice-sequence I tried this problem during the contest but was able to pass only a few test cases.I tried solving it using dynamic programming but time complexity of my solution was O((N^(3/2))*D) (which is an obvious tle given the constraints).Could someone give me some hint on how to reduce the complexity ?
↧