Pergunta de entrevista da empresa Wayfair

Write a method to solve a maze represented as an array.