Sorted Map
noun
say it: “SOR-tid MAP” /ˈsɔrtɪd mæp/
A dictionary that keeps its keys in order, so you can look up by key and also list the keys from smallest to largest.
What is a sorted map?
A sorted map is a dictionary that keeps its keys sorted all the time. C#'s SortedDictionary and Java's TreeMap are sorted maps, built on self-balancing trees; Python and JavaScript have none built in, so they sort a dictionary's keys when they need order.
In a sentence
- “Java's TreeMap is a sorted map, so its contacts come out A to Z without sorting.”
Level: Journeyman · More Data Structures terms at this level
Updated