Natsume
Linked List collection algorithm:
1. Chain = Reference
2. The difference between a set of linked lists and an array set: In terms of value-added, the speed of the array collection is faster than the set of linked list algorithms "Learning Java, to the Kaige123.com Academy", but the list of linked lists is more flexible in terms of adding and removing values and modifying values, and its principle is like a chain.
3. List of categories:
3.1 Single-chain set (to understand): Home can find home, but the next home can not find the home, that is, through the previous array to find an array, but no way to find the previous array through the next array. Such as:
3.2 Double chain set: Home can find home, the home can also find home. Such as:
4. Code implementation (double chaining as an example):
4.1 Adding values
4.2 Adding values to the head
4.3 Add value at tail
4.4 Delete First Value
4.5 Delete last value
4.6 Add a value at the specified location
4.7 Delete Values by subscript
4.8 Improved version of the delete operation: the deleted value can be returned when the delete operation is performed
5. Usage: The list of linked lists is used in queue mode, and the task is queued in a series of operations. Take the queue pattern as an example: the benefits of queuing "learning Java, to the Kaige123.com school" is the first to take out the execution, such as, can be taken before the value, the back of the value, of course, can also go forward
?
A set of linked list algorithms for set frames