Download JNTUH MCA 2nd Sem R17 2021 July-August 842AA Data Structures And Algorithms Question Paper

Download JNTUH (Jawaharlal nehru technological university) MCA (Master of Computer Applications) 2nd Sem (Second Semester) Regulation-R17 2021 July-August 842AA Data Structures And Algorithms Previous Question Paper




R17

2021

Code No: 842AA















JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

MCA II Semester Examinations, July/August - 2021

DATA STRUCTURES AND ALGORITHMS

Time: 3 Hours













Max.Marks:75

Answer any five questions

All questions carry equal marks

- - -


1.a)

Rearrange following numbers using Quick sort: 10, 6, 3, 7, 17, 26, 56, 32, 72.



b)

Give the properties asymptotic notations.











[7+8]









2.

Trace the Merge sort algorithm to sort the list A, V, I, S, H, K, R, U, T, H in alphabetical
order.



















[15]


3.

What is the solution generated by function Job Sequencing algorithm when n = 6
(P1,P2,P3,P4,P5,P6) = (3, 5, 20, 18, 1, 6 ) and (D1,D2,D3,D4,D5,D6) = (1, 3, 4, 3, 2, 1).











[15]









4.

What is a Spanning tree? Explain Prim's and Krushkal's algorithm with the following
graph.



















[15]






5.

Draw an Optimal Binary Search Tree for n = 4 identifiers
(a1,a2,a3,a4) = ( do, if, read, while) P(1:4) = (3,3,1,1) and Q(0:4) = (2,3,1,1,1).

[15]









6.

Discuss the 4 ? Queen's problem. Draw the portion of the state space tree for n = 4
Queens using backtracking algorithm.











[15]


7.

Define Max Heap. Construct Max Heap for the following:



140, 80 , 30 , 20 ,10 ,40 ,30 ,60 ,100 ,70 ,160 ,50 , 130, 110, 120.



[15]









8.a)

Show that the maximum number of nodes in a Binary tree of height `h' is 2h+1-1.

b)

Explain in detail about creation of a Binary Search Tree with suitable example. [7+8]











---oo0oo---


This post was last modified on 17 March 2023