alexbol99 / flatten-interval-tree

Interval binary search tree
MIT License
41 stars 21 forks source link

Question: are intervals returned by `search` sorted? #37

Closed alamothe closed 2 years ago

alamothe commented 2 years ago

Hello @alexbol99, Thank you for this wonderful library.

May I ask if we can assume that the intervals returned by search are sorted?

(I checked the docs, and prior issues before posting)

alexbol99 commented 2 years ago

Hello, @alamothe

The answer is "yes", interval tree is implemented as a binary tree, and search operation also performs traverse of the tree in an ordered way.

Thanks, Alex

alamothe commented 2 years ago

Thank you!