Problem in short: In a grid of size R x C, you need to find the number of paths from the top-left to the bottom-right. You may only move 1 block to the right or one block down in each step. Yo...
My solution is O(R*C*d), can we do better?
It is possible to solve the problem in O(N*log N) as well: