matrix thoda fast rahega map se
Am I going correct in this Question?
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.
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
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
agar ek baar print karwana hai to true rakna hota hai , multiple ke liye false
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
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
Ab shi hai?..
Hogya tha Bhai
Thanks a lot
Ab Kuch doubts clear krdo
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
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
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.