finding maximum value in grid
can be done by going backwards based on directions
- start in bottom right, thought as
- evaluate , i.e. getting maximum value to get to that point
- repeat for those with memoization
avoiding traps
- start in bottom right
- if is not trap, +=
- if is not trap, +=
longest common subsequence
- representing as grid where row/col headers are compared and can ‘skip’ by going down rows
- i.e. if row/col not the same, set to . this is equivalent to skipping a character. if row/col are the same, set to , which is the equivalent to adding to the common subseq