0% found this document useful (0 votes)
15 views2 pages

Introduction Notes

The document discusses data structures and their classification into primitive and non-primitive types. It describes linear data structures like arrays and linked lists, and non-linear structures like trees and graphs. It also outlines common operations on data structures such as traversing, searching, inserting, deleting, sorting, and merging.

Uploaded by

parthadas20201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Introduction Notes

The document discusses data structures and their classification into primitive and non-primitive types. It describes linear data structures like arrays and linked lists, and non-linear structures like trees and graphs. It also outlines common operations on data structures such as traversing, searching, inserting, deleting, sorting, and merging.

Uploaded by

parthadas20201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Introduction

1. Algorithm: An algorithm for a particular task can be defined as “a finite sequence of


instructions, each of which has a clear meaning and can be performed with a finite amount
of effort in a finite length of time”.
2. Data Structure: For many problems, the ability to formulate an efficient algorithm depends
on being able to organize the data in an appropriate manner. The term data structure is used
to denote a particular way of organizing data for particular types of operation.
3. Classification of Data Structures: Data structure can be classified into two categories:
i. Primitive data structure
ii. Non-primitive data structure
4. Primitive Data Structure: Primitive data structures consist of the numbers and the
characters which are built in programs. These can be manipulated or operated directly by the
machine level instructions. Basic data types such as integer, real, character, and Boolean
come under primitive data structures. These data types are also known as simple data types
because they consist of characters that cannot be divided.
5. Non-primitive Data Structure: Non-primitive data structures are those that are derived
from primitive data structures. These data structures cannot be operated or manipulated
directly by the machine level instructions. They focus on formation of a set of data elements
that is either homogeneous (same data type) or heterogeneous (different data type). These
are further divided into linear and non-linear data structure based on the structure and
arrangement of data.
i. Linear Data Structure: A data structure that maintains a linear relationship among its
elements is called a linear data structure. Here, the data is arranged in a linear fashion.
But in the memory, the arrangement may not be sequential. Ex: Arrays, linked lists,
stacks, queues.
ii. Non-linear Data Structure: Non-linear data structure is a kind of data structure in which
data elements are not arranged in a sequential order. There is a hierarchical relationship
between individual data items. Here, the insertion and deletion of data is not possible in
a linear fashion. Trees and graphs are examples of non-linear data structures.
6. OPERATIONS ON DATA STRUCTURES: This section discusses the different operations
that can be performed on the various data structures previously mentioned.
i. Traversing: It means to access each data item exactly once so that it can be processed.
For example, to print the names of all the students in a class.
ii. Searching: It is used to find the location of one or more data items that satisfy the given
constraint. Such a data item may or may not be present in the given collection of data
items. For example, to find the names of all the students who secured 100 marks in
mathematics.
iii. Inserting: It is used to add new data items to the given list of data items. For example, to
add the details of a new student who has recently joined the course.
iv. Deleting: It means to remove (delete) a particular data item from the given collection of
data items. For example, to delete the name of a student who has left the course.
v. Sorting: Data items can be arranged in some order like ascending order or descending
order depending on the type of application. For example, arranging the names of
students in a class in an alphabetical order, or calculating the top three winners by
arranging the participants’ scores in descending order and then extracting the top three.
vi. Merging: Lists of two sorted data items can be combined to form a single list of sorted
data items.

You might also like