While working with linked lists the focus is on manipulating from the front and back of the list. Because of how the list is connected it makes manipulations from the front/back much more efficient than if you were working with a regular list. However, if you were scanning for a certain object in the middle of the list it would be more advantageous to use a regular list.
An example of adding a node to a linked list, it makes two new connections if it is in the middle |
No comments:
Post a Comment