2

I'm trying to find a data structure such that I will get this:

[1, 100) -> A
merge with
[2, 50) -> B

will become like this:

[1, 2) -> A,
[2, 50) -> A,B
[50, 100) -> b

I'm using RangeMap and I want to merge ranges like in the example but it didn't help, I also went through the docs but didn't find a relevant solution. Is there a solution within this data structure or is there a better one I can use? thanks!

Omri
  • 31
  • 2
  • Please update your question with some code examples maybe as it's quite unclear for now what you want to do – Gaël J Jun 22 '21 at 19:14
  • 1
    Welcome to the community Omri! Please take a look at how to post a https://stackoverflow.com/help/minimal-reproducible-example (minimal reproducible example) in order to help us help you, otherwise, your question is likely to be closed and/or downvoted, which you can avoid by improving it. – dev-cyprium Jun 22 '21 at 22:19

0 Answers0