https://practice.geeksforgeeks.org/problems/rat-in-a-maze-problem/1