Arrays!
ARRAYS
Not just a Data Structure but more than that….
In the ocean of Computer science:
Data is the most important aspect;
&
It’s
Storage >> Data;
Now, what are:
Imagine,
Cabinet - full of snacks!
Each snack has its own unique flavor, just like each element in an array has its own unique value.
&
Just like how you can easily grab a snack from the cabinet by its index, you can easily access an element in an array using its index.
Additionally, using array, you anytime add more snacks (or elements) to the cabinet (or array) whenever you want. Yum!
But,
We’re cool because we use python,
Hell yeah! bitter truth,
Le Programmers to Python:
Just a meme don’t take it otherwise!
But python had List which could be further used as Arrays.
Since, Arrays are used to store data items at contiguous allocation
&
having every element stored in it’s respective space known as its
Index,
Making it useful for accessing elements in Array.
Definitely, increases it’s use cases
But,
This is Kaliyuga!
Where no one is perfect,
Same with Data-Structure made by the same,
Disadvantages of Arrays!
Insertion and deletion of element in array take time
&
Here,
comes Linked List! into the picture.
Hint: It’s a Data-Structure 🤫.
Don’t take any language! as a sign of pride.
It’s simply a tool to talk to the compiler.
Above information( Memes + Information) are for educational purpose only, don’t take it otherwise.
And if you taken it seriously, then:
Good Luck!