CHAPTER - 1 - INTRODUCTION TO DATA STRUCTURES
1.1 INTRODUCTION
Data structure is the way of organizing and storing data in a computer system so that it
can be used efficiently.
1.2 CHARACTERISTICS OF DATA STRUCTURES
The following points highlight the need of data structures in computer science:
1. It depicts the logical representation of data in computer memory.
2. It represents the logical relationship between the various data elements.
3. It helps in efficient manipulation of stored data elements.
4. It allows the programs to process the data in an efficient manner.
1.3 APPLICATIONS OF DATA STRUCTURES
Some of the applications of data structures are:
1. Compiler design
2. Operating system
3. Database management system
4. Statistical analysis package
5. Numerical analysis
6. Graphics
7. Artificial intelligence
8. Simulation
1.4 CLASSIFICATION OF DATA STRUCTURES
Data structures are primarily divided into two classes:
Primitive
Non-primitive
1.4.1 Primitive Data Structures
Primitive data structures include all the fundamental data structures that can be directly
manipulated by machine level instructions.
Some of the common primitive data structures include:
Integer
Character
Real
Boolean, etc.
B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College 5
,1.4.2 Non-primitive Data Structures
Non-primitive data structures refer to all those data structures that are derived from
one or more primitive data structures. The objective of creating non-primitive data structures
is to form sets of homogeneous or heterogeneous data elements.
Non-primitive data structures are further categorized into two types:
Linear
Non-linear
1.4.3 Linear Data Structures
In linear data structures, all the data elements are arranged in a linear or sequential
fashion. Examples of linear data structures include:
Arrays
Stacks
Queues
Linked lists, etc.
1.4.4 Non-linear Data Structures
In non-linear data structures, there is no definite order or sequence in which data
elements are arranged. For instance, a non-linear data structure could arrange data elements
in a hierarchical fashion. Examples of non-linear data structures are:
Trees
Graphs
Data Structures
Primitive Non-primitive Data
Data Structures Structures
Linear Non-linear
Integer Real Character Boolean Data Structures Data Structures
Arrays Trees
Linked List Graphs
Stacks
Queues
Fig. 1.1 Classification of Data Structures
6 B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College
, REVIEW QUESTIONS
1. What is data structure? How is it classified?
2. What are the various characteristics of a data structure?
3. What are primitive data structures?
4. What are non-primitive data structures?
5. What is a linear data structure?
6. What is anon-linear data structure?
7. List out the characteristics of data structure?
8. List out the areas in which data structures are applied.
9. What are the major data structures used in the following areas:
RDBMS, Network data model and Hierarchical data model.
10. Write any two data structures used in Operating System?
B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College 7
, 8 B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College
1.1 INTRODUCTION
Data structure is the way of organizing and storing data in a computer system so that it
can be used efficiently.
1.2 CHARACTERISTICS OF DATA STRUCTURES
The following points highlight the need of data structures in computer science:
1. It depicts the logical representation of data in computer memory.
2. It represents the logical relationship between the various data elements.
3. It helps in efficient manipulation of stored data elements.
4. It allows the programs to process the data in an efficient manner.
1.3 APPLICATIONS OF DATA STRUCTURES
Some of the applications of data structures are:
1. Compiler design
2. Operating system
3. Database management system
4. Statistical analysis package
5. Numerical analysis
6. Graphics
7. Artificial intelligence
8. Simulation
1.4 CLASSIFICATION OF DATA STRUCTURES
Data structures are primarily divided into two classes:
Primitive
Non-primitive
1.4.1 Primitive Data Structures
Primitive data structures include all the fundamental data structures that can be directly
manipulated by machine level instructions.
Some of the common primitive data structures include:
Integer
Character
Real
Boolean, etc.
B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College 5
,1.4.2 Non-primitive Data Structures
Non-primitive data structures refer to all those data structures that are derived from
one or more primitive data structures. The objective of creating non-primitive data structures
is to form sets of homogeneous or heterogeneous data elements.
Non-primitive data structures are further categorized into two types:
Linear
Non-linear
1.4.3 Linear Data Structures
In linear data structures, all the data elements are arranged in a linear or sequential
fashion. Examples of linear data structures include:
Arrays
Stacks
Queues
Linked lists, etc.
1.4.4 Non-linear Data Structures
In non-linear data structures, there is no definite order or sequence in which data
elements are arranged. For instance, a non-linear data structure could arrange data elements
in a hierarchical fashion. Examples of non-linear data structures are:
Trees
Graphs
Data Structures
Primitive Non-primitive Data
Data Structures Structures
Linear Non-linear
Integer Real Character Boolean Data Structures Data Structures
Arrays Trees
Linked List Graphs
Stacks
Queues
Fig. 1.1 Classification of Data Structures
6 B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College
, REVIEW QUESTIONS
1. What is data structure? How is it classified?
2. What are the various characteristics of a data structure?
3. What are primitive data structures?
4. What are non-primitive data structures?
5. What is a linear data structure?
6. What is anon-linear data structure?
7. List out the characteristics of data structure?
8. List out the areas in which data structures are applied.
9. What are the major data structures used in the following areas:
RDBMS, Network data model and Hierarchical data model.
10. Write any two data structures used in Operating System?
B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College 7
, 8 B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College