We have reached the 3rd title from “Learn One Programming Language and Work on All” which is “Data Structure” on our list:
- Variables
- Control Structures
- Data Structures
- Syntax
- Tools
Data Structure shows the way we store data in computer for efficient use. Actually, almost all the concepts in Computer Science and Technology are taken from our real-life way of living.
For example, we need a place to store our cloths and wearables in real life. We use cupboard, Wardrobe and etc. to store our things. We used to use boxes to put our clothes inside them before wardrobes came into existence.
Which one do you prefer to store your clothes; the old box-system or a wardrobe?
I guess you prefer to choose wardrobe. The reason is that you get everything organized and easy-to-find. You need not to waste much of your time on finding the variations of your choice among your cloths. This scenario helps us understand that we need something similar to this in programming and computer science as well.
The above example brings us to a point that, we need to store our data in an organized manner in computer to make them easily retrievable. The term “storing data in computer” in software engineering or software development, refers to term “storing data on memory”.
Aww! We studied about Variables in the first session of this series, which also was providing a way to store in our data.
Yep, variables store data for later use but, each variable is capable of just one value at a time, thus if we want to store 10 student/values, we will face some inconvenience. Though it’ll be a wrong method but let’s try storing some students (consider 10) using variables:
String contact1, contact2, contact3, contact4, contact5, contact6, contact7, contact8, contact9, contact10;
contact1 = \"John Smith (john.smith@someCompany.com)\";
contact2 = \"Jane Smith (jane.smith@someCompany.com)\";
contact3 = //... etc.
In programming using the above method is terrible. We NEVER DO THAT! Reasons are:
- Too much lines of code: the above we considered 10 students, think of if you have 10000 students.
- Flexibility of code: If you need to add another student, you’ll have to do it manually by going all the way down/up and find the place to add the new student.
So, the RIGHT WAY?

What is Data Structure?
Glad to see you here, Data Structure is the RIGHT WAY to store multiple data in an organized and manageable way and on a single place. Okay, now let’s get a definition for Data Structure form WIKI;
In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification.
As we use “wardrobe for our cloths”, “locker for locking our private stuffs” and “cupboards for displaying dishware”, the same way, we have different types of “Data Structures” to store different types of data. More important, we have varieties of Data Structures due to their less/high efficiency.
Data Structures are available in almost every programming languages and come under the fundamentals of Computer Science and Software Engineering. Hence as developers, we must have good knowledge about data structures. Here are some common types.

Types of Data Structure are:
1- Arrays
An array is a fixed-size data structure, which stores items of the same data type. It can be an array of Integers only, an array of strings only or even an array of arrays (Two-Dimensional Array).
2- Stacks
Stack is a LIFO (Last In First Out – the last element stored, can be access first) data structure which is found in many programming languages. We store/put cups as stack in real-life.
3- Queues
Queue is a FIFO (First In First Out – the first element in will be access first) and is opposite to Stack LIFO. Queue is just like real-world queue/line – people waiting in a queue.
4- Linked Lists
5- Hash Tables
6- Trees
7- Heaps
8- Graphs
All the Data Structures listed above needs separate discussions in order to be understood well.
Conclusion
So far, we have learned that we need places to store data temporarily on memory where we store our “data in process”. For example, if we are working on a list of students, then we need a place to store the list for a temporary period till our work/process ends.
We learned that if the data is a value, we can store it in a variable, but if we have to process multiple data, then we need to use something better than a variable to decrease the complexity of our program. Data Structures are used for multiple values or entries.