Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CherryPickUp ¶
Wrong Solution Greedy DP not working this is a two-leg dp, one leg greedy did not mean the global optimization for example
grid = [[1,1,1,0,1], [0,0,0,0,0], [0,0,0,0,0], [0,0,0,0,0], [1,0,1,1,1]]. greedy solution: from (0,0) -> (n-1, n-1) is 6, from (n-1,n-1) -> (0,0) is 1 so the total is 7. The expected solution is follow the edges, (0,0) -> (n-1, n-1) is 5 (n-1,n-1) -> (0,0) is 3, so the total is 8
func CherryPickUpNew ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.