Introduction to Segment Trees

Learn how segment trees can be useful in solving coding interview problems.

What is a segment tree?

A segment tree is a full binary tree where each node represents an interval. Generally, a node would store one or more properties of an interval that can be queried later. Look at the ...