Added examples for linked list README

This commit is contained in:
zero4994 2019-01-18 09:45:47 +09:00
parent d308724726
commit 969f906a8e

View File

@ -192,8 +192,36 @@ Some of real live usages are liste below:
/ \
head tail
- Web Browser History
Let's say you are confortably browsing the web on your computer, you are using your favorite browser, when you visit your first page your browser creates a single node list with the website you are looking at.
The value for the node would then be the link for that site, for example, Github
[ Github/javascript-algorithms ]. <- current website (tail and also head)
But then you decide to go to facebook on that tab, but your browser instead of forgetting where you've been keeps track of the last page by adding nodes to that list
[ Github/javascript-algorithms ]. <- (head)
|
[ Facebook/your-profile ] <- current website (tail)
As you keep visiting new websites on that tab the browser keeps track of it and will append it to the tail of the list
until you have something like this
[ Github/javascript-algorithms ]. <- (head)
|
[ Facebook/your-profile ] <- node
|
[ Wikipedia/Pomodoro_Technique ] <- node
|
[ Wikipedia/Life_hack ] <- node
|
[ Whatsapp ] <- current website (tail)
This is a very good example of a double link list
## References