Introduction to Data Structures
Algorithms and Data Structures From Zero to Hero
Why big companies focus on DSA? Why do I need to learn Data Structures? Am I really going to use it?
In computer science, a data structure is a data organisation, management, and storage format that is usually chosen for efficient access to data. — Wikipedia
The choice of a good data structures will allow the algorithm to manipulate the data efficiently
Data structures and algorithms are essential for becoming a skilled programmer since they considerably improve one’s problem-solving capabilities.
What is Data Structure, and Why do I Need to Learn It?
Data Structures are nothing but “meaningful” arrangements of data that algorithms can use to solve any particular problem!
A library is a data structure. It can store books by their metadata, such as the genre.
Hospital records are data structures, and so are phone directories.
For what it’s worth, any database of records is inherently a data structure.
Characteristics of Data Structures
These data structures are often categorised into two groups based on their structures:
- Linear Data Structure: This characteristic arranges the data in sequential order, such as arrays, graphs etc.
- Non-Linear Data Structure: Static data structures have fixed formats and sizes along with memory locations. The static characteristic shows the compilation of the data.
“So, why do I need to learn these data structures in the first place?” — you ask.
“Simply because it makes our lives easier!”
A patient is about to have surgery and yet hospital workers are trying to find his/her records in every corner of the 11-storey building. Imagine the chaos and stress and panic!
Buying a new dictionary only to find the words aren’t in a lexicographically sorted order (who does that except to pull a prank?).
I think it’s safe to say the kind of unfortunate situation we would be in had our society be like that. However, since it’s not, then why should our software be?
And that’s why we need to learn data structures and understand their tradeoffs for different situations to be able to create optimised solutions.
Advantages of Data structures
- They facilitate greater processing speeds. Large amounts of data require faster processing, and data structures help organise the data into forms that are easier to work with and process.
- They make it easier to search for data. Data structures organise information into workable forms that are easier to conduct required searches for.
- They are reusable. Once you implement a given data structure, it can be used anywhere. There is no need to make a new structure. This function saves time and resources.
- They make it easy to handle multiple requests. You rarely find a single user accessing a database. Instead, it’s common to have hundreds, if not thousands, of users searching and interacting with a database. Data structures arrange information so that users don’t have to search every item — they can instantly search just the required data.
In the following articles you will see more details about lineal and non-linear Data Structures.