Skip to content

Commit

Permalink
Update solutions/advanced/spoj-cot.mdx
Browse files Browse the repository at this point in the history
Co-authored-by: envyaims <[email protected]>
  • Loading branch information
1Nigar357 and envyaims authored Jan 23, 2025
1 parent 74478a6 commit cb7950b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/advanced/spoj-cot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author: Nigar Hajiyeva

In this code, a persistent segment tree is built for each node in the tree by modifying that of its parent.

Each persistent segment tree keeps the frequency of numbers on the way from the root node to itself. When asked for the kth minimum node in the path of u to v, the code first determines the lowest common ancestor (LCA). Next, we run a binary search using the frequency values from the persistent segment tree of the three nodes.
Each persistent segment tree keeps the frequency of numbers on the way from the root of the tree given in the input to itself. When asked for the kth minimum node in the path of u to v, the code first determines the lowest common ancestor (LCA) of the tree in the input. Next, we run a binary search using the frequency values from the persistent segment tree of the three nodes.

<LanguageSection>
<CPPSection>
Expand Down

0 comments on commit cb7950b

Please sign in to comment.