From 5d70b380e3b37522b4fbe31fffcf76307afa1c86 Mon Sep 17 00:00:00 2001 From: VikasArsul <92970538+VikasArsul@users.noreply.github.com> Date: Fri, 22 Oct 2021 11:28:25 +0530 Subject: [PATCH] Solution for Rat-In-Maze problem in C++ --- rat_in_maze.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 rat_in_maze.cpp diff --git a/rat_in_maze.cpp b/rat_in_maze.cpp new file mode 100644 index 0000000..808a791 --- /dev/null +++ b/rat_in_maze.cpp @@ -0,0 +1,75 @@ +#include +using namespace std; + +bool isSafe(int** arr, int x, int y, int n){ + + if( x>n; + + int** arr = new int*[n]; + for(int i=0; i>arr[i][j]; + } + } + + int** solArr = new int*[n]; + for(int i=0; i