By MuhammadAl-Halaby, history, 5 days ago, ,

#### I need a hint for this problem 101608L - Knights, please?

 » 5 days ago, # |   +9 Note 1Say you've found places for the first $i$ knights and are looking for spots for the $i + 1$-th knight. How many of the previous knights do you actually care about in terms of where the $i + 1$-th knight can go? Note 2The dimensions: dp[rows][3][5][5][7] Note 3If you think you know what to do, good luck, and I recommend recursion. Create the states in a way that will make it convenient to "shift" each knight when you place another one.
•  » » 5 days ago, # ^ | ← Rev. 2 →   +3 Thank you galen_colin! I tried to implement the idea again with the optimization you mentioned but unfortunately I got TLE!Here is my implementation including both top-down and bottom-up approachesI appreciate your help.