Segment Tree

A segment tree is a tree data structure used to efficiently query and update segments or subarrays of an array. It allows for range queries (e.g., sum, minimum, maximum) and single element updates in logarithmic time complexity (O(log n)). The tree represents the original array by dividing it into smaller segments recursively.

Tags

8 connections Built by Tim Jones