i was trying to use string builder...bahut issues ho rahe they... we had to delete the last character before each recursive call btw if we had to optimize it further then dp use karna hota ? if yes then how? and target TC 3^(N^2) , jabki hoga 4^ hi..
Actually we do not have to tell total number of paths. Yha par agr ek sub problem dubara occur hoti hai to hume pura path uska leke answer me append karna hoga direct return nhi kar skte vha se to is liye dp use nhi kar rhe isme. Time complexity shyad gfg valo ne galat likhi hui hai.
Easy approach, Thank you bhaiyya
Thank you 🙏❤️
i was trying to use string builder...bahut issues ho rahe they... we had to delete the last character before each recursive call
btw if we had to optimize it further then dp use karna hota ? if yes then how?
and target TC 3^(N^2) , jabki hoga 4^ hi..
Actually we do not have to tell total number of paths. Yha par agr ek sub problem dubara occur hoti hai to hume pura path uska leke answer me append karna hoga direct return nhi kar skte vha se to is liye dp use nhi kar rhe isme. Time complexity shyad gfg valo ne galat likhi hui hai.
ek video n-queen problem (gfg) par bana do bhai
Sure 👍
Walker Christopher Robinson Betty White Laura