In the simplest term, a data structure is a container for the data. We can further understand with the help of a real-life example. Let’s say you want to store milk. What are your choices for storing milk? Perhaps a glass, a pouch, a bucket, etc. Now, which container you would choose depends upon what is your use case. You want to drink the milk now, the glass would be your first choice. If you want to carry the milk for later use, the pouch might be a better choice this time.
Each container comes with allowed operations on that container. For instance, you have a box of chocolate, the box is the container, and the allowed operations like opening the lid, closing the lid, getting the chocolate out of the box if it has the chocolate.
Similarly, each data structure comes with allowed operation on that particular data structure. There are many data structures but will cover the most commonly used data structures only.
The sole purpose of the data structure is efficient storage and retrieval of the data.
We are mainly going to focus these data structures.
Quick Links
Legal Stuff