C ++ implementation of the above approach
#include <bits/stdc++.h> NEW_LINE using namespace std ; #define INF  99999 NEW_LINE #define size  10 NEW_LINE int findMinimumSteps ( int mat [ size ] [ size ] , int x , int y , int n ) {