Persistent Segment Tree: Versioned Range Queries
Consider building a collaborative text editor where users can undo to any previous state. Or a database that answers queries like ‘what was the sum of values in range [l, r] at timestamp T?’ Or a…
Read more →