rpds icon indicating copy to clipboard operation
rpds copied to clipboard

Implement .range_index() for RedBlackTreeMap/RedBlackTreeSet

Open liangyongrui opened this issue 4 years ago • 1 comments
trafficstars

Is it possible to search RedBlackTreeMap by index?

like this

liangyongrui avatar Jun 30 '21 07:06 liangyongrui

Currently it's not possible. To have that with O(lg(n)) we would need to add some extra information to each node (the number of elements to the left).

I'm not sure if there is enough demand for this to spend and extra usize per node.

orium avatar Jun 30 '21 09:06 orium