Is there a sorted map?

stunaep via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 12 18:35:27 PST 2016


Is there any sorted map in D? I need a map and I need to be able 
to get the highest key in the map. In java I would use a TreeMap 
and use map.lastKey(), but since associative arrays are not 
sorted that would be O(n). I know about RedBlackTree, but that's 
a set and it must be a map.


More information about the Digitalmars-d-learn mailing list