Euler Tour Magic

Revision en1, by brdy, 2018-11-06 20:13:48

I recently read this article which summarizes cool cp tricks.

Trick 12 is something uses Euler Tour to solve algorithmic problems on trees. The thing is, I don't know what the difference is between euler tour 1 and 2? If in one euler tour for each node we store when it enters and exits, that gives us continuous segments = subtrees. But what about a path? Apparently another euler tour solves this, but I don't know how it should be represents/how to do it. Could someone please elaborate, preferrably with a diagram?

Tags trees, euler, bitset, oleg

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English brdy 2018-11-07 04:20:22 24
en2 English brdy 2018-11-07 04:15:06 1475 Tiny change: 'exa.png)\nIf we vi' -> 'exa.png)\n\nIf we vi'
en1 English brdy 2018-11-06 20:13:48 586 Initial revision (published)