This article summarizes some of the data structures implemented in Java
Briefly:
List<?>: Linked list structure. In general, only the functions of ArrayList and Linkedlist,vector and stack can be implemented with list, which will not be described later.
Queue<?>: queues, which allow deletions only at the front end of a table (front), and in the back-end (rear) of a table, is a linear table of operations constrained. The end of the insert operation is called the tail of the queue, and the end of the delete operation is called the team header.
map<?,?: For storing key-value pairs of data, key-value pairs are stored in entry<?,?, and cannot store duplicate key values, when the same key value is appended, the value of the previous value,key is allowed to be empty.
Set<?>: implemented by the map package, the structure features are consistent with the map, but only single objects can be stored.
The data structure involved:
Stack: provides push and stack (POP) functions
queues: non-blocking methods for offer and pull, blocking methods for put and take
List : provides various functions such as add, find, remove, traverse, etc.
Tree: Red-black tree, usually used for random search, top n or sorting functions
Thread Safety
Queue, HashTable, Concurrenthashmap are thread-safe, the rest are unsafe, and the new Java lock is introduced later, and will be explained in depth.
Complexity of Time
Not to be continued
Summary of data structures in Java