Re:There are only 3 types of data structures
by andrewp123 on Monday August 14, 2023 @02:02AM
(#37117965)
The article explicitly states that sorting is O(n log n), giving rise to log n per element.
I think you missed that I'm talking about adding/removing/reading a single element at a time.
1. indexed data structures with an O(n) worst-case operation
2. order-less data structures with an O(1) worst-case operation
3. sorted data structures with an O(log n) worst-case operation
That's it. Let me know what you think"
I disagree.
sorting is a O(n*log(n)) worst-case operation for example.