Data Structures Simplified
Real-Life Examples
As most of you know, data without structure leads you nowhere. In this blog, we will try to compare different data structures with real-world examples.
First of all, What is DataStructure?
A way in which you can store your data so that you can organize, manage, and retrieve it in the most efficient way possible. Now let’s relate it to real-world examples:
Stack
How do you arrange your books on the table? You arrange one on top of the other. That’s what exactly stack
The structure looks like this. (Given that you are not messy and take books in random order) You take a book from the top, you add a book to the top.
Array
The array is a stack, but in this case, you will take books in random order.
LinkedList
Have you ever taken a ride on a train? You see each bogey, and it will be attached to two other bogeys on its left and right, right? That’s our very own DoublyLinked List (left most and right most have no left and right bogie respectively)
Queue
A queue is almost everywhere, from liquor shops to the school bus.
First come, First serve
Tree
Check your family tree. Your grandfather, his sons, and daughters, your cousins. That is the best example you have.
Graph
Social media is the best example that you have. How does Twitter suggest to other people? In simple words, if you follow anyone who follows me, eventually Twitter will recommend me to you.
So for God’s sake hit that follow button(Adarsh____gupta)
I will be starting a new Series on DataStructure for developers where I cover the important Topics on Each DS in Depth
Follow and turn on notifications so you don’t miss this.
Wrapping it up!
Thanks for reaching this far, you are a fantastic reader!
You can relate everything to some other thing, and that can really help you understand the most difficult thing.
Follow Adarsh gupta for more interesting articles.
If you want to support me, you can buy me a coffee.