both Rust and C++ basically give you two big “map families”:
- ordered map (tree-based): keys kept sorted, predictable iteration order
- unordered map (hash-based): keys not sorted, usually faster average lookups
What an ordered map actually is
BTreeMap (Rust) and std::map (C++) are not arrays.
They are balanced trees (B-tree …


