I recently encountered a question QTREE on SPOJ. Initially I had no idea how to solve the question. After a bit of googling , I found that there is something called heavy-light decomposition which is involved in the question. But I was unable to find any resource which can explain this topic in an easy manner. Please if you know some resource where it is explained comprehensively and in easy way , please tell me.