Share option not working

@sanchit.bansal06
Apparently the share option is not working on coding blocks ide.What should i do?

@Par1hsharma,
Save the code. And share the url

@Par1hsharma,
For input use:

for (int i = 0; i < row; i++) {
			String str = scan.next();
			for (int j = 0; j < col; j++) {
				maze[i][j] = str.charAt(j);
			}
		}

Take input as a string and then assign the char using charAt. The output for sample test case is incorrect. Try to debug your code, if you face any problem, feel free to reply to this thread

i am not able to understand how this code is sufficient to display the RIGHTMOST PATH to the maze.I have not added any special function or more I programmed the same code as told in the video lecture of “BLOCKED MAZE”. by garima mam. can you help me ?

@Par1hsharma,
Sure. I will help you

1 Like

please explain how we are able to get the righmost path after using the same code for blocked maze video lecture

@Par1hsharma,

https://ide.codingblocks.com/s/299158 corrected code.

Things to look out for:

  1. Input format.
  2. First go right then check if path exists then go down and check if path exists.
  3. ‘x’ should be capital as mentioned in the question, i.e. ‘X’

WHAT IS THE USE OF THE LINES I HAVE COMMENTED IN YOUR CODE GIVEN BELOW AND WHY HAVENT RETURNED TRUE OR FALSE VALUES IN BLOCKED MAZE QUESTION IN VIDEO LECTURE
//maze[row][col] = ‘X’;

    solboard[row][col] = 1;

    boolean right = ratmaze(maze, row, col + 1, solboard);

 //   if (right) {

   //     return true;

    }

    boolean down = ratmaze(maze, row + 1, col, solboard);

 //   if (down) {

    //    return true;

    }

    solboard[row][col] = 0;

    return false;

@Par1hsharma,
What are you doing is, we are going right first and then down. If a path exists when we go right, return true, else check for down. If a path exists when we go down, return true. Else return false.