BTreeMap
A map that keeps its keys in sorted order.
BTreeMap<K, V> is an ordered map built on a B-tree; operations take logarithmic time, iteration is in key order, and range queries are supported. Keys need Ord.
Loading interactive…
Examples
Inserting
"Peru"and then"Japan"into aBTreeMapand printing it shows Japan first: keys come out in sorted order.
See also