3 ms·
> and an ordered map could be implemented on a trie, a vector, a linked list, some other thing I can't think of right now, or... some variety of a binary tree.
by BeetleB 3y ago
> and an ordered map could be implemented on a trie, a vector, a linked list, some other thing I can't think of right now, or... some variety of a binary tree. Right? I don't think I would want to assume.
You're correct in that one shouldn't assume a red-black tree. However, the standard does dictate O(...) performance for the map, which strongly suggests an underlying structure.
And as I point out in another comment: Knowing that it was indeed a tree helped me debug an issue where I ran out of RAM.
In any case, you're point strengthens mine: That you don't need to know "fundamentals" to program in C++.