Pergunta de entrevista da empresa Amazon

Number of palindromic paths between start and end element of a 2-D array