I'm glad to hear that. Thank you for your support!
@Sathvik279
Ай бұрын
For D, can't we just use house robber concept?
@vikram4007
Ай бұрын
Thanks for the explanation
@CPwithShayan
Ай бұрын
Thank you for supporting!
@sagnikbiswas3268
Ай бұрын
Really nice and clear explanations - helps ease out the editorial. Quick question for D - isn’t log(n) a really high bound. Couldn’t we say it takes 3 steps. Perhaps, I’m too ambitious but that’s my hunch. Because any vertex should not take more than 3 tries to color.
@alexeyamosov664
25 күн бұрын
My thought exactly, but it simply did not work)
@PikaGMS
Ай бұрын
goated bro thank you! i'd advise to just try to get rid of that static noise coming from your mic but other than that very high quality content thank you
@CPwithShayan
Ай бұрын
Maybe I must buy another mic. Thanks for the feedback
@proudbox5091
Ай бұрын
Great Video Shayn.Another approach for D can be to modify MIS algorithm , dp on tress.First pick the first MIS , make all vertexes in its path zero.Since steps are lgnN atmost , it should work in O(N log N). RIght??
@Leo-kx8gu
Ай бұрын
Thanks for the explanation 😊😊
@CPwithShayan
Ай бұрын
Thank you for supporting!
@swarupkumarbhuyan8831
Ай бұрын
Awesome D explanation
@CPwithShayan
Ай бұрын
I'm glad you liked it. Thank you!
@vaibhavsingh566
Ай бұрын
For the first time i wasn't able to solve A ,feeling bad. I was trying to prove my idea but failed everytime.
@adii16089
Ай бұрын
Same happened with me:(
@premdeviitjodhpur1098
Ай бұрын
same
@taspiaibrahim
10 күн бұрын
Please keep it up Your good work. Please don’t stop this. Take love from Bangladesh 🫶
@CPwithShayan
7 күн бұрын
Sure, thanks a lot for your support.
@gutongxing
25 күн бұрын
Thanks a lot sir.😊😊
@CPwithShayan
25 күн бұрын
You’re welcome ❤️
@italk-gj5kk
Ай бұрын
Thanks shayan for explanation would expect more solution videos on dynamic programming, greedy and graph related questions…. You are a CP expert and you can shake KZitem if you participate in this field literally
@CPwithShayan
Ай бұрын
Thank you. I am working on it!
@user-cu6yq5sr6n
Ай бұрын
He is CP legendary Grandmaster and you are still saying him expert . that's funny
@torspo5409
Ай бұрын
I really appreciate these explanations!
@CPwithShayan
Ай бұрын
Thank you very much!
@pulkitgoyal8685
Ай бұрын
He looks like samay raina
@CPwithShayan
Ай бұрын
Lol
@EgorVasilyev-vf8hy
Ай бұрын
In problem C, please explain why it is necessary to cycle through the powers of 2 from 62?
@tusharsingh9346
Ай бұрын
You are bold personalityvery smart person 🔫🔫
@CPwithShayan
Ай бұрын
Thank you, bro!
@user-nk7fj5sx4x
Ай бұрын
you explained the proof for logn rounds after you saw it yourself. Can you explain how you derived that it would be logn in the beginning. or what was your intuition at first?
@CPwithShayan
Ай бұрын
No, I had my own proof, but I guess I did not explain it well.
@____-qf7mz
Ай бұрын
Thanks for the good explanations
@CPwithShayan
Ай бұрын
Glad it was helpful!
@jitushekkumar7083
Ай бұрын
excellent explanation as always
@CPwithShayan
Ай бұрын
Glad you like it! Thanks for the support.
@user-yh8ny3gc1o
Ай бұрын
thanks
@CPwithShayan
Ай бұрын
Welcome
@subhamsagar3941
Ай бұрын
Thanks for the awsome explainations 🤗
@CPwithShayan
Ай бұрын
Glad you like it! Thanks for the support.
@ChuanhuaYu
Ай бұрын
感觉讲的很不错
@CPwithShayan
Ай бұрын
Happy to hear that 😂
@louisfghbvc
Ай бұрын
PD is really cool problem
@aryansatija7686
Ай бұрын
amazing explanation
@CPwithShayan
Ай бұрын
Thank you very much for your support!
@suharshsharma6764
Ай бұрын
didnt understood A what does the k-2 is accounting for in n-1+k-2/k-1.also n-1/k-1 is not getting accepted why?
@ashishjukaria7332
Ай бұрын
use ciel for n-1/k-1
@suharshsharma6764
Ай бұрын
@@ashishjukaria7332 this i understood and thanks code worked with ceil but tell me how the work is getting done with n-2?also we can insert k integers right so why k-1 since the question is saying no more than k but it is not saying about k .so why we are assuming that in one operation we can insert k-1 not k positive integers ?
@prabhu__why_not
Ай бұрын
@@suharshsharma6764 Assume u have n = 5 and k = 3 so we will have to choose {1,1,3} to maintain the sum(1,1,3) = 5 constrain. so we have to take (k-1) 1's and (n - k + 1) one time.
@siddheshpandey7905
Ай бұрын
@@suharshsharma6764 1. We can add k-2 into n-1 to avoid using ceil, since if value n-1 is not the perfect multiple of k-1 their will be some remainder from 1 to k-2 in such case value of (n-1)/(k-1) will be 1 less than required. 2. Initially there will be 1 element present and in one operation it will be broken into k elements therefore increase in elements in one operation is k-1.
@suharshsharma6764
Ай бұрын
@@siddheshpandey7905 thanks bro understood
@onepiececlashers4360
Ай бұрын
Can anyone explain why it will atmost logn?
@CPwithShayan
Ай бұрын
Is that section of the video unclear?
@adnanshahriar4062
Ай бұрын
Can anyone tell me what is the rating of problem C
@tusharsingh9346
Ай бұрын
1000
@Reio_Sama
Ай бұрын
in the 'split the multiset', i understood why you made ciel((n-1)/(k-1)), i tried this and the answer did come little wrong, But in your code i saw you write (n-1+k-2)/(k-1) which produced the correct answer, can you please explain why we need (+k-2).
@anuragbhanu2890
Ай бұрын
Standard formula of ceil(a/b)
@Reio_Sama
Ай бұрын
@@anuragbhanu2890 ohhhh, that's new to me. thank you for telling me.
@abhijeetkumar8410
Ай бұрын
could u please explain that log n part in D (optimality can be achieved within log n)....
@swarupkumarbhuyan8831
Ай бұрын
The max nodes i.e. leaf nodes can be at most logn in a tree with n nodes , so assume you are deleting all leaf nodes at one step ( not optimal but just assume because u can do so ) , so at every step u delete nodes with a particular depth=k , so to delete n nodes , you will at max require logn rounds , that is the reason as well we consider a 2d dp array of size n*log(3e5) , which is near to n*20
@adii16089
Ай бұрын
Sir in the 3rd que you had written 1ll..what does it means?? is it something like long long or maybe something else..can anyone please tell me:( and thank you sir:)
@varunsahu4269
Ай бұрын
Yes it's long long, he is just type casting int to long long as the constraints are bigger..
Пікірлер: 64