A Way For Learning

Understand Linked List

No comments
To have a clear picture of how a linked list is working, Let's take the example of Houses. First, think of these questions.

  • Does every house on the earth has a unique identifying location?
  • How do you visit your friend's house?
  • Do you visit with the help of the address? 
So the address here is similar to the reference of the object. Apart from storing the data, we also store the reference to the next object. In this way, links are created between the objects so when you want to move to the next object you will use the reference and get the data of the next object.




No comments :

Post a Comment