amazing work!! i don't think us viewers can thank you enough :) your solutions and explanations are on point! the best part is that you are regular with uploading these videos, which is so awesome🌟
It would be easy for us , if you share the code of your ideas that how you implemeted especially problems D,E,F ++ .Your explaination is perfect it helped me a lot . THANK YOU
Why linear algorithm for making palindrome in problem F is optimal? we should not just make a palindrome, but make it in a fastest way. Can anyone plz explain to me, why this greedy 2-pointers algorithm is optimal?
@@hkrai1372 yes I have done it by this method too and my code is accepted. So first of all add all the elements in the max heap and then run loop while heap is not empty and do some operations alternatively. So if the move is of alice then simply add the top element in sum and if it is bob turn then check what is the diff by subtracting the bob value by sum and try to increase it as max as possible to get the minimum value for bob
Yes the number of movemnets can never be greater than 2 to reach the destination from a given source. If the nodes have common color than it will take 1 movement otherwise it can always be done in 2 movements at max.
Thanks a lot, brother. please, don't stop making these videos. These videos are helping incredibly.
hhh, Rright!
Thank you for your support, brother. Sure!
I just found your channel through my senior, really appreciate your work bro. Thanks a lot ❤
I’m happy you like it!
amazing work!!
i don't think us viewers can thank you enough :)
your solutions and explanations are on point! the best part is that you are regular with uploading these videos, which is so awesome🌟
Thanks a lot for your kind words!
It would be easy for us , if you share the code of your ideas that how you implemeted especially problems D,E,F ++ .Your explaination is perfect it helped me a lot . THANK YOU
you can check submissions of shayan on codeforces
Thank you so much❤❤❤❤
Glad it is helping!
Why linear algorithm for making palindrome in problem F is optimal? we should not just make a palindrome, but make it in a fastest way. Can anyone plz explain to me, why this greedy 2-pointers algorithm is optimal?
amazing work shayan
Thanks!
In problem F, can prefixes and suffixes overlap?
Good explanation for problem E. tnx!
Glad it was helpful!
Bro please start codechef contest discussion also😊😊
Do somebody understand F authors solution code. Totally couldn't understand the two values which ans minus😂
in c i used max heap and solve for top 2 element. but it was giving wa on tc2 . any reason why?
@@hkrai1372 yes I have done it by this method too and my code is accepted. So first of all add all the elements in the max heap and then run loop while heap is not empty and do some operations alternatively. So if the move is of alice then simply add the top element in sum and if it is bob turn then check what is the diff by subtracting the bob value by sum and try to increase it as max as possible to get the minimum value for bob
@@mathematics7746 thnx bruh!
on problem D is the number of movements is at most 2 ? or it can be greater than 2
Yes the number of movemnets can never be greater than 2 to reach the destination from a given source. If the nodes have common color than it will take 1 movement otherwise it can always be done in 2 movements at max.
why on D we can't solve using graph?????? can you please tell me ?????
Because for each vertex you would add O(n) edges to graph
@@jacek300 u mean due to time complexity we can't use it right?
@@mathematics7746 yes bro
@@mathematics7746 i too was trying to solve using union find algo
@@mathematics7746yeah, time and space complexity