Hello there
so i found this problem on spoj
we have a tree where each node has an integer weight and two types of queries
1- print sum of weights in subtree of given node
2- change root to given node
now first type of queries is no issue if the root is fixed ... i would solve it with segment tree, but changing the root kinda ruins everything
any hints about how i should think about this would be really appreciated :D