In the lists that we have used so far each node provides information about where is the next node in the list. It has no knowledge about where the previous node lies in memory. If we are at say the 15th node in the list, then to reach the 14lh node we have lo Traverse the lis! right from the first node. To avoid this we can store in each node not only the address of ne*( node but also the address of the previous node in the linked list. This arrangement is often known as a 'Doubly Linked List'.
No comments:
Post a Comment