Download JNTUH (Jawaharlal nehru technological university) MCA (Master of Computer Applications) 2nd Sem (Second Semester) Regulation-R132018 June-July 812AF Data Structures And Algorithms Previous Question Paper
R13
Code No: 812AF
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
MCA II Semester Examinations, June/July - 2018
DATA STRUCTURES AND ALGORITHMS
Time: 3 Hours
Max. Marks: 60
Note: This question paper contains two parts A and B.
Part A is compulsory which carries 20 marks. Answer all questions in Part A. Part B
consists of 5 Units. Answer any one full question from each unit. Each question carries 8
marks and may have a, b, c as sub questions.
PART - A
5 ? 4 Marks = 20
1.a) Write a procedure to convert infix expression to postfix expression. Apply the procedure on
the following
((A+B)*D) (E-F)
[4]
b)
Define Binary tree. Write an algorithm to insert an element in to a binary tree.
[4]
c)
Write the principle of(i) Quick sort (ii) Merge sort and write their complexities. [4]
d)
Construct an AVL Tree by inserting numbers from 1 to 8.
[4]
e)
Explain Kruskal's Algorithm for Minimum cost spanning trees.
[4]
PART - B
5 ? 8 Marks = 40
2.
What is meant by stack? Write push and pop functions in C++ using an array.
[8]
OR
3.a)
Write a short note on Linked List. What the various applications of linked list?
b)
Write an algorithm for deleting an element from the linked list.
[4+4]
4.
With a neat sketch explain DFS and BFS traversals with an example.
[8]
OR
5.
Explain Binary tree ADT and its representation in Array and Linked lists.
[8]
6.
Suppose a sequence of numbers is given like: 5, 1, 6, 7, 9, 22, 10, 55, 45, and 34. How this
numbers will be sorted using a) Insertion Sort b) Bubble sort.
[8]
OR
7.
Write an algorithm for linear search and Binary Search and compare them in terms of time
complexity.
[8]
8.
Explain in detail about Red-Black trees and Splay trees with examples.
[8]
OR
9.a)
Show the result of inserting 3, 1, 4, 6, 9, 2, 5, 7 into an initially empty binary search tree.
b)
Show the result of deleting the root.
[4+4]
10.
Discuss about Job Sequencing with deadlines and Single Source Shortest path problem.[8]
OR
11.
Explain the Pattern matching algorithm with an example.
[8]
---oo0oo---
This post was last modified on 17 March 2023