Hard

Segment Tree

A segment tree stores answers for ranges of an array. A range query and a point update each climb or cover O(log n) nodes.

Costs

CategoryData Structure
DifficultyHard
BuildO(n)
Range queryO(log n)
Point updateO(log n)

Questions

What is Segment Tree?

A segment tree stores answers for ranges of an array. A range query and a point update each climb or cover O(log n) nodes.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.