Company: American express
Difficulty: medium
Maximum Path Value You are given a board of N rows and M columns. Each field of the board contains a single digit (0-9). You want to find a path consisting of four neighboring fields. Two fields are neighboring if they share a common side. Also, the fields in your path should be distinct (you can\'t visit the same field twice). The four digits of your path, in the order in which you visit them, create an integer. What is the biggest integer that you can achieve in this way? Input Format The input is a matrix of integers represented as vector<vector<int>> &Board. Output Format Return the biggest integer that can be achieved when concatenating the values in a valid path of length four. Constraints N and M are integers within the range [1..100] Each element of matrix Board is an integer within the range [0..9] There exists a path of length 4 which doesn\'t start with 0 Examples Example 1: Given the following board (N=3, M=5): 9 1 1 0 7 1 0 2 1 0 1 0 1 1 0 The function should r