Array Advantages: Fast query, if you know the index can quickly access the disadvantage: Delete slow, size fixed ordered array advantages: Faster than unordered array lookup disadvantage: Delete and insert slow, size fixed stack advantages: Provide last-in-first-out access method disadvantage: Access to other items is slow queue advantages: Provide first-in-out access method disadvantage: access to other The items are slow. List Advantages: Quick Insert, delete fast disadvantage: find slow (each node) binary tree Advantages: Find, INSERT, delete both fast (balanced binary tree) disadvantage: Delete algorithm complex red-black tree Advantages: Find, INSERT, delete are fast, the tree is always balanced (local adjustment) Disadvantage: The algorithm is complex
2-3-4 Tree Advantages: Find, INSERT, delete are fast, the tree is always balanced. Similar trees are useful for disk storage disadvantages: Algorithmic complex Hash Table advantages: If the keyword is known, access speed is very fast, insert fast disadvantage: Delete slow, if you do not know the keyword access is slow, the use of the storage space is not sufficient advantages: INSERT, delete fast, access to the largest data very quickly disadvantage: access to other data items is slow Pros: Modeling weaknesses in the real world: Some algorithms are slow and complex
Common Java Data Structures & pros and cons