intro
Let's start with appreciating this tool I am using to edit this article (Google Chrome), a program also known as computer program.
A computer program is a collection of instructions to perform a specific task. For this, a computer program may need to store data, retrieve data, and perform computations on the data.
A data structure is a named location that can be used to store and organize data. And, an algorithm is a collection of steps to solve a particular problem.
What is data, you may ask?π€¦ββοΈ
so data is the collection of different numbers, symbols, and alphabets to represent information. Note that this information is unordered, hence might not have meaning.
is data structure really important?
Absolutely, the choice of a good data structure makes it possible to perform a variety of critical operations effectively. An efficient data structure also uses minimum memory space and execution time to process the structure.Learning data structures and algorithms allow us to write efficient and optimized computer programs.
Nice π tell me more
Now that you have a glimpse, we have 2 types of data structure, namely:
- Linear data structures-think of them as data structures where elements are arranged in a single dimension i.e. lists/arrays, stack, queue etc
- Non-Linear Data Structure. - Opposite of linear, elements are arranged in many dimension i.e. one-many relationship, many-many relationship or many-one relationship. Examples of these data structures are: tree, graph, table, etc.
Sounds interesting, can you give some examples π€
We know how to classify data structures, so far so good. Here is a list of most used data structures:
- Array/lists
- Linked-lists
- Dictionaries
- Stacks
- Queues
- Binary trees
- Heaps
summary and next steps
Today we have learned what is data, data structure and a computer program. What are different types of data structures and their examples. Next article we will take a look at most used data structures.
Top comments (0)