I want to be a good software engineer, should I know about Data Structure? The answer is yes, of course. 🙂
Data Structure is a very fundamental subject in computer science. In our computer, we are dealing with data every time. In fact, without data, there is nothing to do on a computer.
Suppose a folder on your computer has too many movies in different genres. Finding a movie when you need it is a bit of a hassle. To organize them, you created a folder on your computer called Movies. Within that folder, you create separate folders for your favorite genres. Then you sort the movies on your computer according to the genre. As a result, the movies are kept in an organized way and there will be many benefits to finding them.
These movies are but a kind of data. In doing so, you have used an important computer data structure. Which is called Tree. It is a minimal example of a Tree. It has more complex use in computer science. Our computer folder structure is a Tree data structure. We will discuss Tree in more detail in any subsequent article.
There are so many proven Data Structures in computer science. Such as Array, Linked List, Stack, Queue, and so on. These help us a lot to organize our data efficiently. According to the Wikipedia definition “In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.”.
We all know about Array. It is the most common data structure in any language. So, how this data structure can help us?
Think we need to store the name of every month. So which one would be better for it? Declaring different variables for each month’s name or using an array? The answer is, of course, array. Declaring a variable for each month would be very annoying. Although for this little amount of data we may not understand the difference. But what if we had to store more than a thousand single data? I hope you got the idea. We also need to know when to use a data structure or when to not.
Retrieve: We need to know how to read data from a data structure.
Insert: How to insert value in a specific place. It could be the first node of a tree or last position from an array.
Update: Update data in an existing place. It could be anywhere of a data structure.
Remove: how to remove data from a data structure. It could be one or more data.
We need to know about these common operations for every data structure. The process of these operations can differ from the data structure. But the work is the same.
So, that’s the small overview of data structure. I hope you enjoy this article.