🛠️ Steven Gong

Search

SearchSearch

Aug 07, 2023, 1 min read

Tree Query

Tree Queries are more advanced Range Query, done on Trees.

What are the fastest ways to treat tree queries?

  • Finding the k-th Ancestor → Use similar idea to Successor Path
  • Lowest Common Ancestor of two nodes
  • Path Queries / Subtree Queries → Use Segment Tree

Graph View

Backlinks

  • Binary Search
  • Successor Graph
  • Tree

Created with Quartz, © 2025

  • Blog
  • LinkedIn
  • Twitter
  • GitHub