tag:blogger.com,1999:blog-9093889912215350229.post2651825421433768974..comments2024-03-18T13:18:20.198+05:30Comments on <code>Learning Algorithms with Rachit Jain</code>: A Tricky DP Problem on TreesRachit Jainhttp://www.blogger.com/profile/02906400765901317364noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-9093889912215350229.post-78283901425469644692020-08-28T18:28:46.683+05:302020-08-28T18:28:46.683+05:30```A uniform tree is one where for every node, its...```A uniform tree is one where for every node, its direct child have same value.```<br /><br />states that all values should be same but adding `sum` doesn't fulfill the requirement.. or does it so?<br /><br />Anonymoushttps://www.blogger.com/profile/09697735115672202418noreply@blogger.comtag:blogger.com,1999:blog-9093889912215350229.post-31361006665220302772017-06-29T01:49:28.256+05:302017-06-29T01:49:28.256+05:30The comment just shows the complexity if we don...The comment just shows the complexity if we don't move duplicates,but in reality we move every element from one set to another.Like if both the set contain exactly same elements,then also while merging these two sets we require n*log n iterations where n is the size of a set.Can u please prove the complexity for these type of cases?<br />Thanks :)Anonymoushttps://www.blogger.com/profile/04362544938334905698noreply@blogger.comtag:blogger.com,1999:blog-9093889912215350229.post-6260672372382377592017-06-27T23:08:09.617+05:302017-06-27T23:08:09.617+05:30Hi,
I also didn't get this when I read this fo...Hi,<br />I also didn't get this when I read this for the first time. I am sure this will help you. http://codeforces.com/blog/entry/10696 (Read kingofnumber's comment)Rachit Jainhttps://www.blogger.com/profile/02906400765901317364noreply@blogger.comtag:blogger.com,1999:blog-9093889912215350229.post-15310863829826858242017-06-26T12:07:11.970+05:302017-06-26T12:07:11.970+05:30I understood everything except for the complexity ...I understood everything except for the complexity part.Can u plz explain it again?Anonymoushttps://www.blogger.com/profile/04362544938334905698noreply@blogger.comtag:blogger.com,1999:blog-9093889912215350229.post-9335957780003053292017-06-26T03:25:47.988+05:302017-06-26T03:25:47.988+05:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/04362544938334905698noreply@blogger.com