here is another dynamic programming problem that find the maximum L(chess horse - 4 item) sum in the given matrix (m x n)
For example :
1 2 3
4 5 6
7 8 9
L : (1,2,3,6), (1,4,5,6), (1,2,5,8), (4,5,6,9) ...
and the biggest sum is sum(L) = sum(7,8,9,6) = 30
what is the O(complexity) of the optimal solution ?
it looks like this problem (submatrix with maximum sum)
Say all items are positive
Both positive and negative
Any ideas are welcome!