By using a data structure, we are able to understand the relationship between elements and organize them in our memory. An organization of data is represented by a mathematical or logical model. The study of data structures includes:
Data structure logically described
Data structure implementation
Data structure quantitative analysis
Quantitative analysis is determining the amount of memory needed to store the data structure and the time required to process it.
The data structure is a representation of the logical relationship between data elements. In other words, a data structure is a way of organizing all data items that consider not only the elements stored but also their relationship to each other. Areas in which data structures are applied extensively are:
As a result, different data structures are used in many applications to perform operations on data structures. Run time and memory utilization are traded off in such a situation. A data structure that saves memory but sacrifices speed will result in a slow run time; a data structure that utilizes memory efficiently will result in a fast run time. The strengths and weaknesses of each data structure are different. The following table shows the characteristics of various data structures
Characteristics of Various Data Structures
Data Structure |
Advantages |
Disadvantage |
Array |
Quick insertion, very fast access if the index is known |
Slow search, Slow deletion, Fixed size |
Ordered Array |
It quicker search than an unsorted array |
Slow insertion and deletion, Fixed size |
Stack |
|
|
Queue |
|
|
Linked List |
|
|
Trees |
|
|
Graph |
|
|