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

M.E - Degree Examinations, January 2025: Explain The Concept of Time Complexity With An Example

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

M.E - Degree Examinations, January 2025: Explain The Concept of Time Complexity With An Example

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

Reg. No.

Question Paper Code UTI

ST. PETER’S COLLEGE OF ENGINEERING AND TECHNOLOGY


AVADI, CHENNAI 600 054
M.E - DEGREE EXAMINATIONS, JANUARY 2025
First Semester
UNIT TEST - I
DEPARTMENT OF CSE
MC11R001 –ADVANCED DATA STRUCTURES AND ALGORITHMS
(Regulations 2021)
Duration: 2 Hours Max. Marks 50
Answer All Questions
PART-A (5  2 = 10 Marks) K-Level CO
1 What is Recursion in Data Structures? K2 CO3
Recursion in data structures is a technique where a function calls itself to
solve a problem. This approach divides a problem into smaller sub-problems
of the same type, solving each recursively until reaching a base case (a
condition where the recursion stops).

Example of Recursion: Factorial Calculation

2 Explain the concept of time complexity with an example. K2 CO3


Time complexity measures the time an algorithm takes to run based on input
size. For example, linear search has O(n) complexity, where 'n' is the number
of elements.

3 What is a tree in data structures? K2 CO3


A tree is a hierarchical data structure with nodes organized such that one node
is the root, and all other nodes are connected via edges forming parent-child
relationships.

4 What is a heap? What is the main application of heaps? K3 CO3


A heap is a complete binary tree used to implement priority queues, where the
root contains the largest (max-heap) or smallest (min-heap) element. Heaps
are used in implementing priority queues and in sorting algorithms like heap
sort.
5 What is a graph in data structures? Mention two applications of graphs. K2 CO3
A graph is a collection of vertices (nodes) connected by edges. It is a non-
linear data structure used to represent relationships between elements.
Applications of graph are (i) Network routing and communication (ii) Social
network analysis.

PART – B (2  12 = 24 marks)
Marks K-Level CO
6a. Evaluate a try block that is likely to generate three types of exception and 12 K5 CO3
Knowledge Level: K1 – Remember; K2 – Understand; K3 – Apply; K4 – Analyze; K5 – Evaluate; K6 – Create 1
then incorporate necessary catch blocks and handle them appropriately
Or
6b. Describe Thread process and Determine its lifecycle and states of thread 12 K3 CO3
with examples
7a. Demonstrate Inter Thread Communication and suspending , resuming and 12 K3 CO3
stopping threads
Or
7b. There are three statements in a Try block – statement1, statement 2 & 12 K4 CO3
statement 3.After that there is a catch block to catch the exceptions occurred
in the try block. Assume that the exception has occurred in statement 2. Does
statement 3 get executed or not

PART – C (1  16 = 16 marks)
Marks K-Level CO
8a. Design two threads to display odd numbered element in an array of size 50 16 K6 CO3
and even numbered element in another array of size 50. Create instances of
the above thread and run them
Or
8b. Define an Exception called “NoMatchException” that is thrown when a 16 K6 CO3
string is not equal to “India”. Create a program that uses this exception
Distribution of COs (Percentage wise)
Evaluation CO1 CO2 CO3 CO4 CO5 CO6
Marks - - 90 - - -
% - - 100 - - -

Knowledge Level: K1 – Remember; K2 – Understand; K3 – Apply; K4 – Analyze; K5 – Evaluate; K6 – Create 2

You might also like