Powerful_Orkhan's blog

By Powerful_Orkhan, history, 7 months ago, In English

Sometimes when we search a bout trees problems ... We get problems that contain queries but with trees I think that this problems have a good tricks and so hard to find these trick so if anyone have an idea about how to solve problems that contain trees and queries .. pls give me resource how to learn and problems to solve and thanks for all and sorry for bad english .

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
7 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

You can learn how to solve this kind of problems by learning Euler tour technique, but you must be familiar with segment tree, there are many other techniques that can solve trees queries but this is so powerful and simple enough to start with.

https://usaco.guide/gold/tree-euler

You can learn it from here.