3 ms·
> any sort of generic ordered container that supports O(n) iteration must necessarily require O(n log n) work to construct in the average case This doesn't app
by ErikCorry 5y ago
> any sort of generic ordered container that supports O(n) iteration must necessarily require O(n log n) work to construct in the average case
This doesn't apply if the order you want is insertion order.
These hash maps are constructed in O(n) on average, just like any other hash maps.
Java's LinkedHashMap is also constructed in O(n).
- sgeisenh 5y ago"ordered container" meaning that the container is ordered based on the objects it contains.