What is the time complexity of indexing, inserting and removing from common data structures?
- 阅读更多 关于 What is the time complexity of indexing, inserting and removing from common data structures?
问题 There is no summary available of the big O notation for operations on the most common data structures including arrays, linked lists, hash tables etc. 回答1: Information on this topic is now available on Wikipedia at: Search data structure +----------------------+----------+------------+----------+--------------+ | | Insert | Delete | Search | Space Usage | +----------------------+----------+------------+----------+--------------+ | Unsorted array | O(1) | O(1) | O(n) | O(n) | | Value-indexed