Google | Onsite | Find all longest paths

Give a N by N matrix, a person start to move from upper left corner and can move in four directions(up down left right), however, cannot move out of matrix or re-visit same spot, find all longest paths and output.(As long as it cannot move, we consider it as longest path)

Comments (9)