What is Data Structure? Why should I learn Data Structure?
Over the past few decades, the speed of computers has tremendously increased. Computers nowadays can perform millions of instructions in a matter of seconds. But when the complexity of a problem increases we will no longer be in a position to ignore the performance of the computer and, How data is stored in the computer directly affects its performance. So, for the better performance, we need a method to structure and organize data efficiently in a storage. This is where Data Structures came handy.
What is Data Structure?
A Data Structure, as the name suggests, is a method to store data in a structured way so that it can be easily created, viewed, and managed.
A one-liner definition may not be enough to explore Data Structures. So Let's take an example:
The picture above shows us a system of directional nature of 3 places. We can represent a different component of the system in a different way. Let's store all the possible paths of the system. For this we may simply use a list.
So, we can go from Home to Office, Home to Cafe, Office to Cafe, Office to Home, Cafe to Home but not Cafe to Home. This is one of the ways to store the data of the system.
We may also take any of the places on one side and list all the possible paths we can go from that point to remaining points on the next side. i.e
Why should I learn Data Structures?
The above example shows that for any pieces of information there are multiple ways we can structure and store the data but all the options availaible to us may not be efficient and may result in poor performance. So, knowing about Data Structures allows to choose appropriate Data Structure for a specific job from which programmers can write efficient programs.
Hey there, I'm Nischal.
I am a student, a developer and I specialize in
standards-based Django, JS, HTML, CSS web development.
I love Everything that makes me more Human. While
not Coding, I play and/or watch football.