Added algo to find all paths in a matrix