Data Stream as Disjoint Intervals — Ordered Set / TreeMap

Record each sold seat as it comes in, allowing repeat reports, and on request give merged runs of taken seats in ascending order.

Ordered Set / TreeMap · Medium

More in Ordered Set / TreeMap

All algorithm problems