Which data structure provides efficient range queries with O(log n) time for updates and queries?
-
A
Fenwick Tree
-
B
Segment Tree
Correct answer
-
C
Binary Indexed Tree
-
D
Sparse Table
Correct answer
B. Segment Tree
14 views
Explanation
Segment trees support range queries and updates in O(log n) time.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ