2
$\begingroup$

This question is about segment-tree as described in this Wikipedia article.

When constructing the tree (inserting the new input-interval), if the input-interval doesn't contain the node-interval we have to recurse into node's child, where child-interval intersects input-interval.

But what if both children-intervals intersect input interval? Should I recurse into both children-nodes?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.