algorithm - Augmented interval tree -
i'm trying implement augmented interval tree using balanced binary search tree ordered "'low' values of intervals".
in plain old search trees, when trying insert key present in tree, common ignore duplicate (no insertion).
but when storing intervals, might have (1,2) , (1,3) have same 'low' value distinct.
how deal duplicate 'low' values in augmented interval trees? mean, should allow insertion of multiple same 'low' values? in order? , how search through tree if there duplicate keys?
the linked article suggests using high value of each interval secondary ordering. have total order on intervals, , can search normally. intersection queries don't require particular order among intervals same low value; become obvious once write code.
Comments
Post a Comment