K knight problem

V
this is my code i am tring to print the moves but for input>6 tle is coming any modification which i can do??

@shampblocks hey,ye code kaun se qstn ka hai funky chess board ka ki koi aur?

not of funky chess board i am trying to print the moves a knight can move in a matrix and if it cannot move then printing 0

give it a input you will understand what i am trying to do sir

@shampblocks hey,yhi approach hai is qstn ki ,isse efficient nhi hogi ,as recursion with backtracking use horhi hai to recursion max apni limit tk jarha hai uske age time lgega abs dene me use ,test cases bhi chote honge so go with this method only.

But in video. I saw input 8 is accepting but my code is not accepting input 8 that’s why I want to know why does this code is giving tle for input8??

@shampblocks hey kaun si video ki bat krrhe ho,also compiler pr depend krta hai ,koi ans dedete koi nhi de pate but recursion me jada bda input ka ans nhi ata limit hoti hai.

YouTube video of coding blocks recursion webinar sir by deepak sir I think from 25 minutes onwards… You can check that…

40 min onwards*…

@shampblocks hey ,same logic use hua hai usme bhin,test cases different honge islie dikkt arhi hogi logic sahi hai.

ohk thanks bhaiya…

@shampblocks no problem bhai

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.