Some real-world examples of the Data structure "Linked List" 👇
A thread 🧵
🔸Train is an example of a linked list as it is made up of a collection of railroad cars where each car is connected to the car in front of it.
🔸A chain is an example of a linked list as it is connected in a linked list fashion. Each link is connected with the next one.
🔸One funny example of linked list
🔸Image viewer is also an example of a linked list as you can view the previous and next image respective to the current image
🔸Previous and forward navigation in your browser is also implemented in a linked list
🔸A music player in which we can only play the next song after current and not the previous one is an example of a singly linked list
🔸A music player in which we can play both the previous as well as the next song is an example of a doubly linked list
🔸A music player in which we can play songs in loop i.e after finishing the last song it automatically plays the first song is an example of circular linked list
🔸Undo redo operations are mostly implemented in a linked list
🔸Keeping track of turns in a multiplayer board game is an example of a circular linked list. Put all the players in a circular linked list. After a player takes his turn, advance to the next player in the list.
🔸Musical chair game is an example of a circular linked list in which chairs are connected in a circular link and after each iteration of the game, one chair (node) is removed from the list.
🔸Planning a trip to some particular destination is an example of a linked list as you plan a series of directions where to go to after which place. Each step in the navigation sequence has a logical order and then points to the direction to take after the current step.
🔸GPS Navigation: A linked list of map data. Traveling from origin to destination is an example of traversing through all nodes.
Rerouting by a GPS is an example of Add and Remove operations of map data.
This is the end of the thread.
Real-life examples for other data structures coming soon. Be sure to give a follow to @meetjain74
Also if you liked this Retweet the first tweet
And let me know your thoughts below on this
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.