I was solving this problem which seemed like a pretty much standard problem of persistent segment tree but i came across this solution which seems to use some dfs ordering of nodes and i'm unable to figure out what is going on?
Problem: Given a tree (100000 nodes) and a value in each node, and for each query you are given 2 nodes and a value V , you have to find number of nodes whose value is less than V.
This is my first time on codeforces. Thanks in advance