All technological notes.
Abstract Data Type: an abstraction of a data strucutre which provides only the interface to which a data structure must adhere to.
computer program
data structure
Data structure and data types are slightly different.
Data structure is the collection of data types arranged in a specific order.Algorithm
Learning data structures and algorithms allow us to write efficient and optimized computer programs.
Basically, data structures are divided into two categories:
Linear data structure
Non-linear data structure
In linear data structures, the elements are arranged in sequence one after the other. Since elements are arranged in particular order, they are easy to implement.
However, when the complexity of the program increases, the linear data structures might not be the best choice because of operational complexities.
LIFO principle.

FIFO principle where first element stored in the queue will be removed first.

vertex and each vertex is connected to other vertices through edges.

Now that we know about linear and non-linear data structures, let’s see the major differences between them.
| Linear Data Structures | Non Linear Data Structures |
|---|---|
| in sequential order, one after the other. | in non-sequential order (hierarchical manner). |
| All the items are present on the single layer. | The data items are present at different layers. |
| can traverse all the elements sequentially in a single pass. | requires multiple runs. might not be possible to traverse all the elements in a single pass. |
| The memory utilization is not efficient. | Different structures utilize memory in different efficient ways depending on the need. |
| Time complexity increase with the data size. | Time complexity remains the same. |
| Example: Arrays, Stack, Queue | Example: Tree, Graph, Map |