apple / apple/swift-collections

Interval trees

Open
#511 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Swift
Stars
4.5k
Forks
405
Avg merge
3d 3h
Merged PRs (30d)
10

Description

These are useful: https://en.wikipedia.org/wiki/Interval_tree
There's some overlap with RangeSet. I'd want interval sets/dictionaries as first-class components, but you could get better complexity bounds by switching to interval tree representation when RangeSets get large (for non-overlapping ranges).

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked interval tree overview and comparing the proposal with RangeSet. Clarify whether the goal is first-class interval sets and dictionaries, a large-RangeSet representation change, or both; done requires an agreed design and complexity bounds before implementation can be scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.