C Programming and Data Structures: Unit III: a. Linear Data Structures - List

Introduction to Data Structure

Definition, Example, Types

Definition : The data structure can be defined as the collection of elements and all the possible operations which are required for those set of elements. In other words data structure will tell us the required elements as well as the legal operations on those set of elements.

Introduction to Data Structure

Definition : The data structure can be defined as the collection of elements and all the possible operations which are required for those set of elements. In other words data structure will tell us the required elements as well as the legal operations on those set of elements.

For example :

Consider a set of elements which are required to store in an array. Various operations such as reading of the elements and storing them at appropriate index can be performed. If we want to access any particular element then that element can be retrieved from the array. Thus reading, printing, searching would be the operations required to perform these tasks for the elements. Thus data object integer elements and set of operations form the data structure-array.

 

1. Types of Data Structures

The data structures can be divided into two basic types Primitive and Non primitive data structures The Fig. 3.1.1. shows various types of data structures.


Linear data structures are the data structures in which data is arranged in a list or in a straight sequence.

For example

Arrays, List

Non linear data structures are the data structures in which data may be arranged in hierarchical manner.

For example

Trees, Graphs

 

C Programming and Data Structures: Unit III: a. Linear Data Structures - List : Tag: : Definition, Example, Types - Introduction to Data Structure