Data Structures19 sections · 729 units
Open in CourseQuiz: Sparse Tables
Test your understanding
Sparse Table Concepts
Why can Sparse Table answer range minimum queries in O(1) but not range sum queries?
- A.Sum queries need to track more elements
- B.Range sum requires more memory to store
- C.Minimum is idempotent (min(a,a)=a), so overlapping ranges give correct result; sum is not idempotent (a+a≠a)
- D.The minimum operation is faster to compute