Am I going correct in this Question?

matrix thoda fast rahega map se

1 Like

Okayy
Kaafi shi rhega fir ton

bhai yeh kuch errors remove kiye
Yeh Scope ke kya errors derha

Iske liye Base Case mein return true ki jgah return false krdu
Chlega na?

nahi base case mein return true is rahega.

1 Like

check now->

ek visited array aur rakhna padega takki infinite circle mein na phase .

ek baar rat chases its cheese problem solve karo ,phir ye karna

1 Like

Rate chases its cheese
Same Problem nhi hai
Rate in a maze jaisi

Abhi dekha
Difference is usme ek print krwaana pdega

ND For that,
yaar mene Base Case mein ek baar print krwaadiya
Agar Multiple Print krwaane hain fir false krnaa pdega right?
Jaisa N Queen mein kiya tha

abhi ton Killed dikharha O/P with that I/P.

agar ek baar print karwana hai to true rakna hota hai , multiple ke liye false

1 Like

infinite recursion ki wajah se. isko solve karne ke liye visited array rakhni padegi aur.
isiliye bol raha hu ek bar rat chases its cheese revise kar lo

1 Like

Bhaiyeh ton direct isse hogya tha
bas 1 test case nhi pass kiya tha

Fir isme bhi Same Modifications lgaani pdegi kya
!down
!right waali

wo sol matrix isme bhi lagegi.

ha ye laga sakte ho thoda time kam lagega phir

1 Like

Ab shi hai?..

@cbcao263

ab dekho->

base case correct kiya hai , waha last cell ka index hona tha

1 Like

Hogya tha Bhai
Thanks a lot

Ab Kuch doubts clear krdo :smiley:
Yeh solved kyu liya
Jab mene element pehle hi i*n+j+1 se krliya tha
isliye solved kahe kiya

solved bus ye store kar raha hai ki current path tak hum kis kis cell se ho ke aaye hain.
isko hum use kar rahe hain taaki koi bhi cell ek sa jayda baar na visit ho path find ke dauran.
isiliye hum agar kisi cell be jaa rahe hai jaha sol[i][j] 1 hai to waha se hum false return kar rahe hai ,kyunki wo already hum pehle include kar chuke hain.
aur infinite cycle bhi avoid hoga

1 Like

Okayyy Bro
Thanks a lot

Bhut Acha smjhaadiya
Thanks a lot

Bro Aap Whatsapp Group mein bhi ho na
Launchpad waale mei

dont know bro . . . . . . . . .

Okayy :sweat_smile: :sweat_smile:
I just want to ask
DP Advance krne ke liye DP Course lena Best rhega ya nhi?
Means wo Course CP perspective see hai ki CF Problems
YA
Interview Basis pe

Ek Pepcoding ki series bhi best hain DP pe Youtube pe
Plz btaadena
Kya best rhega

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.