SegmentTree.max constructor

SegmentTree.max(
  1. List<num> values
)

Builds a max tree: range queries return the maximum over the range. The identity is double.negativeInfinity for the symmetric reason. Audited: 2026-06-12 11:26 EDT

Implementation

SegmentTree.max(List<num> values) : this._(values, math.max, double.negativeInfinity);