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

IT1 Answer Key

The document is an answer key for an internal test on Data Structures and Design at SSM Institute of Engineering and Technology. It includes questions and answers on algorithms, data structures, object-oriented programming concepts, and sorting algorithms. The document also outlines various operations related to linked lists and queues, along with their applications.

Uploaded by

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

IT1 Answer Key

The document is an answer key for an internal test on Data Structures and Design at SSM Institute of Engineering and Technology. It includes questions and answers on algorithms, data structures, object-oriented programming concepts, and sorting algorithms. The document also outlines various operations related to linked lists and queues, along with their applications.

Uploaded by

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

SSM INSTITUTE OF ENGINEERING AND TECHNOLOGY ,DINDIGUL

DEPARTMENT OF AIDS & CSBS

Subject: AD3251 DATA STRUCTURES AND DESIGN


Year/Sem: I/II Max Marks: 60
INTERNAL TEST –I
Answer key
Part- A (10 * 2=20)
1.What is an Algorithm?
An algorithm is a step-by-step procedure or a set of rules designed to solve a specific problem or perform
a task.

2.What are the types of analysis of algorithms?


Worst-Case Analysis: This analysis gives a upper bound on the runtime
Average-Case Analysis: This analysis gives a lower bound on the runtime
Best-Case Analysis: This analysis gives the region between the upper and lower bound on the runtime.
3.What is Inheritance?
Inheritance is a key concept in Object-Oriented Programming (OOP) that allows a class (called the child or
subclass) to inherit properties and behaviors (methods and variables) from another class (called the parent or
superclass).

4.Define Linear and Non-Linear data structures. Give an example for each.

Linear Data Structures: These structures store data in a sequential order this allowing for easy insertion and deletion
operations. Examples include arrays, linked lists, and queues.

Non-Linear Data Structures: These structures store data in a hierarchical or interconnected manner this allowing for more
complex relationships between data elements. Its examples are trees and graphs.

5.Differentiate stack ADT and Queue ADT

S. no Stack ADT Queue ADT

1 Stack is a list in which insertion and deletion Queue is a list in which insertion is done in one end
operations are done in one end. called ‘Rear’ and deletion is done in another end
called ‘Front’.

2 Stack follows the principles of LIFO( Last In Queue follows the principles of FIFO(First In First
First Out). Out).

6.Illustrate the differences between linear lined list and circular linked list.

S. no Linear linked list Circular linked list

1 The last node contains a null pointer. The last node contains a pointer to the first node of
the list..

2 The beginning of the list contains the head The circular linked list has no beginning and no
node. end..

7.List the applications of stack.


 Function Call Management
 Expression Evaluation and Conversion
 Undo/Redo Functionality
 Backtracking Algorithms
 Syntax Parsing

8.Define List ADT


A list (or sequence) is an abstract data type (ADT) that represents a finite number of ordered values.
9.What is sorting and searching algorithm?
Both sorting and searching algorithms are essential concepts in data structures and algorithms. They help us
organize and retrieve data efficiently.

10.Give a situation when quick sort is better than bubble sort.


Quick Sort is almost always better than Bubble Sort in real-world situations due to its faster performance and
scalability.

Part B (2X16 = 32 + 1x8=8) 40marks

11) a) i )Explain about asymptotic notations and their role in algorithmic analysis 8 marks
Asymptotic Notations - 2 marks
The Big O (Big- Oh) Notation - 2 marks
The Big Ω (Big – Omega) Notation - 2 marks
The Big θ (Big - Theta) Notation - 2 marks

ii) Explain in detail about the Shallow and Deep copy of a class with suitable example 8 marks
Shallow copy – Definition and Explanation - 4 marks
Deep copy – Definition and Explanation - 4 marks

OR

b) List out all Object-Oriented Programming (oops) concepts and Explain in detail 16 marks
What is Object-Oriented Programming? - 2 marks
Importance and Benefits of Object-Oriented Programming (OOP) in System Design - 4 marks
Classes and Objects in Object-Oriented Programing(OOP) – 2 marks
Inheritance in Object-Oriented Programing(OOP) - 2 marks
Polymorphism in Object-Oriented Programing(OOP) - 2 marks
Abstraction in Object-Oriented Programing(OOP) - 2 marks
Encapsulation in Object-Oriented Programing(OOP) - 2 marks

12) a) List Out and explain various operations of Linked list 16 marks
Linked list definition - 2 marks
Types of linked list – 2 marks
Operations performed in singly linked list - 4 marks
Operations performed in doubly linked list - 4 marks
Operations performed in circularly linked list - 4 marks

OR

b) Write Procedure for significant operations on a queue data structure. List any four applications of queue data
structure 16 marks
Queue data structure - 2 marks
Operations on a queue data structure - 8 marks
Applications - 4 marks

13)a) Given the following list of keys(3,18,29,32,39,44,67,75),Explain the formal algorithms and show the
contents of the array after each iteration of the outer loop for the (i)bubble sort(ii) selection sort
8 marks
Bubble sort algorithm - 2marks
Contents of the array after each iteration by using bubble sort algorithm - 2 marks
Bubble sort algorithm - 2marks
Contents of the array after each iteration by using bubble sort algorithm - 2 marks

Faculty Incharge HoD/AIDS&CSBS

You might also like