DSPD Assignment 1
DSPD Assignment 1
Ans. A data structure is a way of organizing and storing data in a computer so that it can be accessed and
used efficiently. It refers to the logical or mathematical representation of data, as well as the
implementation in a computer program.
A data structure is not only used for organizing the data. It is also used for processing, retrieving, and
storing data. There are different basic and advanced types of data structures that are used in almost
every program or software system that has been developed. So we must have good knowledge about
data structures.
Data structures are an integral part of computers used for the arrangement of data in memory. They are
essential and responsible for organizing, processing, accessing, and storing data efficiently. But this is not
all. Various types of data structures have their characteristics, features, applications, advantages, and
disadvantages.
Classification:
Linear Data Structure: A data structure in which data elements are arranged sequentially or linearly,
where each element is attached to its previous and next adjacent elements, is called a linear data
structure. Example: Array, Stack, Queue, Linked List, etc.
Non-linear Data Structure: Data structures where data elements are not placed sequentially or linearly
are called non-linear data structures. Examples are trees and graphs.
Data structures are used in a wide range of computer programs and applications, including Databases,
Operating Systems, Computer Graphics, Artificial intelligence.
The structure of the data and the synthesis of the algorithm are relative to each other. Data presentation
must be easy to understand so the developer, as well as the user, can make an efficient implementation
of the operation.
The use of data structures provides several advantages such as Efficiency, Flexibility, Reusability,
Maintainability.
2) What do you mean by Analysis of Algorithm? Explain different asymptotic notations Used for
analysis of Algorithm.
3) Write a program to implement Binary Search Algorithm using recursion. State the time
complexity.
4) Sort following array element using insertion sort also explain time complexity. 80, 27, 42,14, 69,
22, 85.
5) Sort the following array using selection sort. Also specify its time complexity 80, 27, 42, 14, 69,
22, 85.
6) What do you mean by Divide and conquer strategy? Give suitable example for the same.
7) Write a detailed note on Abstract data type. Give suitable example for the same.