• + 0 comments

    Hey guys i solved the problem using heavy light decomposition incorporating segment tree lazy propagation .

    I managed to secure 112.5/120 point . (with 47/50 test cases passed)

    just three test cases aborted due to i assume because of memory limits

    i again wrote quite well long commented/documented code wchin you can find on submissions abhishek's submsission commented/documented code wchin you can find on submissions [(https://www.hackerrank.com/challenges/subtrees-and-paths/submissions/code/202527244)