Solve maze tasks and compute shortest routes | Meta Interview Question