Pergunta de entrevista da empresa ServiceNow

Algorithm using dynamic programming. Find the optimal solution to complete a maze.