Bro, i was pulling my hair to solve this problem and you are amazing bro.... thanks you so much for such a great explication
@CodeWithSunchitDudeja2 жыл бұрын
You are most welcome
@Venkatesh546292 жыл бұрын
@@CodeWithSunchitDudeja Could you please explain we what exactly we are doing in Math.Min(dp[i], dp[j] + changeTime + dp[i - j])
@MrHotfish882 жыл бұрын
Amazing explanation🤯 thanks bro!🔥
@written_syntax2 жыл бұрын
🔥🔥
@theghostwhowalk2 жыл бұрын
Thanks. With reference to formula on line 26, Dp[i] = min time to complete I+1 lapse right? When we change tire at j location, Why we have dp[j] + dp[i-j]+..
@eprohoda2 жыл бұрын
beautiful ~ taek care, =)
@avdd802 жыл бұрын
I'm struggling with Knapsack problems. Can you please point me to a couple of your past videos where you explain solutions to knapsack problems in detail?
@hoyinli74622 жыл бұрын
same here. I have been watching this channel for quite a long time but I can't remember knapsack skills.
@hoyinli74622 жыл бұрын
kzbin.info/www/bejne/ip6ZpZlvoLejb5I I guess this is the one. But is there more videos?
@CodeWithSunchitDudeja2 жыл бұрын
Thanks for sharing there is one more video kzbin.info/www/bejne/bpywoXaFntqUmMU
@nehagupta-op7si2 жыл бұрын
I think dp[i] = Minimum time to complete i loops instead of minimum time to complete ith loop
@amritanshu832 жыл бұрын
Could you please explain if (timeToCompleteLaps >2 ^17) break;
@hoyinli74622 жыл бұрын
how about the time complexity? You used double loop from 1-1000. So the time complexity should be O(n^2) (n = numLaps)?
@CodeWithSunchitDudeja2 жыл бұрын
yes
@amritanshu832 жыл бұрын
Since we know we must change tyre in 18th lap could you please explain: dp[i]=i
@ShubhamGupta-qk9uq Жыл бұрын
More of a solution than explaination, please take some time to explain intuition even if you think it is obvious. Thanks
@bgmilover97842 жыл бұрын
@Coding Decoded bro, i got everything but i am not clear about what exactly we are doing at line 26 (dp[i] = Math.Min(dp[i], dp[j] + changeTime + dp[i - j]);) could you please explain me this?
@jianpengyu98432 жыл бұрын
Nice explanation, but I don't quite understand nochange array. What happens if I stick with tire A for 3 laps and then change to tire B and stick with tire B for 4 laps?
@gauravkungwani2 жыл бұрын
till 5:00 you are only explaining the question, in a 11: 00 min video. Bro who comes to see the solution for this, has already understood the question. After that it is good. Try avoiding it.
@CodeWithSunchitDudeja2 жыл бұрын
Yes, I can reduce on this time but I do it explicitly so that all are on same page.
@blenderbottle3822 жыл бұрын
I don’t think I fully understood the withoutChange array. What does it represent? What does the ith index in that array mean?