Definition
A data structure is a particular way of storing and organizing data either in computer’s memory or on the disk storage so that it can be used efficiently. Data structures are used in almost every program or software system. Common examples of data structures are arrays, linked lists, queues, stacks, binary trees, and hash tables etc.
Applications of Data Structures
- Compiler design
- Operating system
- Statistical analysis package
- DBMS
- Numerical analysis
- Simulation
- Artificial Intelligence
           The major data structures used in the Network data model is graphs, Hierarchical data model is trees, and RDBMS is arrays. Specific data structures are essential ingredients of many efficient algorithms as they enable the programmers to manage huge amounts of data easily and efficiently. Some formal design methods and programming languages emphasize data structures and the algorithms as the key organizing factor in software design. This is because representing information is fundamental to computer science. The primary goal of a program or software is not to perform calculations or operations but to store and retrieve information as fast as possible.
When selecting a data structure to solve a problem, the following steps must be performed,
- Analysis of the problem to determine the basic operations that must be supported. For example, basic operation may include inserting/deleting/searching a data item from the data structure.
- Quantify the resource constraints for each operation.
- Select the data structure that best meets these requirements.
This three-step approach to select an appropriate data structure for the problem at hand support as data-centered view of the design process.
In this approach, there are three concern
- The first concern is data and the operations that are to be performed on them.
- The second concern about representation of the data.
- The third concern about the implementation of that representation.
While one data structure may allow accessing data items sequentially, the other may allow random access of data. So, selection of an appropriate data structure for the problem is a crucial decision and may have a major impact on the performance of the program.
CLASSIFICATION OF DATA STRUCTURES
Data structures are generally categorized into two classes,
- Primitive data structures.
- Non-primitive data structures.
Primitive data structures are the fundamental data types which are supported by a programming language. Some basic data types are integer, real, character, and boolean.
Non-primitive data structures are those data structures which are created using primitive data structures. Examples of such data structures include linked lists, stacks, trees, and graphs. Non-primitive data structures can further be classified into two categories: linear and non-linear data structures.
LINEAR AND NON-LINEAR STRUCTURES
LINEAR DATA STRUCTURES
If the elements of a data structure are stored in a linear or sequential order, then it is a linear datastructure. Examples include arrays, linked lists, stacks, and queues. Linear data structures can be represented in memory in two different ways. One way is to have to a linear relationship between elements by means of sequential memory locations. The other way is to have a linear relationship between elements by means of links.
NON-LINEAR DATA STRUCTURES
If the elements of a data structure are not stored in a sequential order, then it is a non-linear data structure. The relationship of adjacency is not maintained between elements of a non-linear data structure. Examples include trees and graphs.
OPERATIONS ON DATA STRUCTURES
Traversal: Visit every part of the data structure.
Search: Traversal through the data structure for a given element.
Insertion: Adding new elements to the data structure.
Deletion: Removing an element from the data structure.
Sorting: Rearranging the elements in some type of order (e.g Increasing or Decreasing).
Merging: Combining two similar data structures into one.
Views: 0