TLDR: When dealing with dynamic arrays where elements are frequently updated and range queries (like sum or minimum) are continuously executed, a naive loop takes \(O(N)\) time per query. Segment Tree
Markdown supported · ⌘↵ to post
No responses yet.