Design and Analysis of Algorithms
Design and Analysis of Algorithms
Design and Analysis of Algorithms
1. Discuss features of algorithms and analyze the differences between recursive and
iterative algorithmic structure.
2. Analyze the role of design structures in structuring and manipulating solutions
and implement respective programs.
3. Discuss the properties, operations, applications, strengths and weaknesses of the
different algorithmic design approaches and their analysis.
4. Analyze, interpret and compare various problem solving strategies and their
efficiency analysis
5. Discuss the storage management for efficient access of data
Note: Answer five questions; any Four questions from each unit-I and unit-II and Two full
question from unit-III, IV & V
Unit-I
(c) Differentiate between Linear and non-linear data structures with 5 CO1 L3 1.4.4
suitable example.
(d) Write an algorithms to print the nth node from end of a singly linked 5 CO2 L3 1.4.4
list
(e) 5 CO1 L3 1.4.4
Complete the function described below:
Function Name: welcome
Input Params: base address of string
Return Type: base address of welcoming string
Description: A manager wants to generate welcoming notes for its
employees.For inputstring “Parker”, the function should produce
“Welcome Parker”. Do not use any inbuilt string handling functions
Unit-II
Model Question Paper
2 5 CO3 L4 1.4.4
(a)
You have been invited to a post-exam party.
i) You walk in and shake everyone’s hand. As the number of
attendees Nincreases, what is the order of growth to shake everyone’s
hand? Justify.
You meet everyone else and during each meeting, you talk about
everyone else in the room. To what efficiency class does this belong
to? Justify.
(b) 5 CO3 L3 1.4.4
Create a AVL Tree for:
50, 60, 80, 30, 20, 40, 70
Can you perform the three tree traversals on AVL tree? Justify
youranswer.
(c) Bring out the differences between BFS and DFS algorithm. Also 5 CO4 L2 1.4.4
compare with respect to efficiency analysis.
(d) 5 CO3 L3 1.4.4
Write a algorithm for given below
description:ALGORITHM
CountLeafNodes(T)
// Recursively counts the number of leaf nodes in the tree T
(e) 5 CO4 L2 1.4.4
Which algorithm design technique is used for the given below
algorithms/problems:
i) Merge Sorting
ii) Binary Search
iii) Fractional knapsack problem
iv) 0/1 knapsack problem
v) Travelling salesman problem
vi) N-Queen’s Problem
vii) Graph coloring problem
viii) Matrix chain multiplication
ix) Job sequencing with deadline
Prim’s algorithm
Unit-III
Unit-IV
Unit-V
At each line, the function should display data from all the nodes
present.After printing each line, an appropriate node has to be
deleted.
After printing the last line, “last” pointer should be holding the
NULL
value.
(c) 10 CO5 L2 1.4.4
Describe NP –Hard and NP complete problems with example. Also
differentiate among them.
Model Question Paper
2.1: Demonstrate an ability to identify and 2.1.2: Identify processes, modules, variables, and
characterize an engineering problem. parameters of computer based system to solve
the problems.
Eg: 1.2.3: Represents Program Outcome „1‟, Competency „2‟ and Performance Indicators
„3‟.