I want to develop a custom Interval map something like this.
Initially all keys in the map will point to value k. Now we will insert ranges in the map let's suppose :- (1,4)-> 2 , (3,5)-> 6 Then we can access values via keys provided in the map. The main issue is we have to implement all of this in o(log(n)) complexity all for insertion, deletion, retrieval.
PS: Map's key type and value type can be anything(key can be decimal, integer string etc).Even ranges can be decimal.