Google Interview Question

NP problem (MAZE path)