Intermediate Data Structures & Algorithms
Q53 / 100

What is a segment tree used for?

Correct! Well done.

Incorrect.

The correct answer is B) Efficient range queries (sum, min, max) and point updates in O(log n)

B

Correct Answer

Efficient range queries (sum, min, max) and point updates in O(log n)

Explanation

A segment tree is a binary tree built over an array enabling O(log n) range queries and point updates. Each node stores aggregate info for a subarray.

Progress
53/100