|
|
back to boarddp[i][j] - represents number of staircases with i cubes and with the height of last block j. Answer is dp[n][1] + dp[n][2] + dp[n][3] ... dp[n][n]. can u help me with some algorithm better than dp(which works in O(n^2)) Edited by author 11.07.2016 03:57 |
|
|