Input: N = 2 Matrix = {{348, 391}, {618, 193}} Output: 1009 Explaination: The best path is 391 -> 618. It gives the sum = 1009.