Longest water-flow path with momentum
You get an m x n matrix of heights. Water starts at any cell and moves to a neighboring cell up, down, left or right. Whether it may move on depends on the heights and on the momentum it has built up on earlier steps. Return the length of the longest path it can travel.
No answer yet. Write the first one; the best answer gets endorsed.
