Mazepath_d2(count ,print)

https://ide.codingblocks.com/#/s/17924

Take as input N. N is the number of rows and columns on a square board. Our player starts in top-left corner of the board and must reach bottom-right corner. In one move the player can move 1 step horizontally (right) or 1 step vertically (down) or 1 step diagonally (south-east). But the diagonal step is allowed only when the player is currently on one of the diagonals (there are two diagonals)

a. Write a recursive function which returns the count of different ways the player can travel across the board. Print the value returned.

b. Write a recursive function which prints moves for all valid paths across the board (void is the return type for function).

shivam u are not considering all the cases check this
https://ide.codingblocks.com/#/s/17930

showing wrong answer no-output

just ry to submit its once again it is passing all test cases see

https://hack.codingblocks.com/contests/c/456/382

the link is not opening ,is this is the question

question

Ohh thats a different question
not to worry just add a diagonal path in my sol u will get the ans i cannot submit my sol for this as this contest is not opening for me.
if still not getting the right sol reply i will modify my code.
Happy Coding!

shivam i have modified the code


if any problem reply
Happy codiing!:slightly_smiling_face:

only 3rd&4th test case passed not 1st and 2nd case

1 Like

help…!!
@phantom