JNTUH

JNTUH MCA 2019 DATA STRUCTURES AND ALGORITHMS Previous Question Paper (December 2019 - R13)

MCA | 2019 | II | R13 | December 2019

Answer PaperPaper Code: 812AFMaximum Marks: 60Time: 3 Hours

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

120 marks
a

Define a single linked list, Write the structure of the linked list with neat sketch.

4 marks

Answer

A singly linked list is a linear data structure where each element, called a node, contains a data field and a pointer (or reference) to the next node in the sequence. It allows for efficient insertion and deletion of elements as it does not require contiguous memory allocation.

The structure in C is:

struct Node { int data; struct Node* next; };

Sketch representation: [Data|Next] -> [Data|Next] -> [Data|NULL]

b

Explain the representations of graphs.

4 marks

Answer

Graphs are primarily represented using two methods:

  1. Adjacency Matrix: A 2D array of size V x V where matrix[i][j] = 1 if there is an edge from vertex i to vertex j, and 0 otherwise. It is efficient for dense graphs but requires O(V2) space.
  2. Adjacency List: An array of linked lists where each index i represents a vertex and points to a list of all vertices adjacent to i. This is more space-efficient for sparse graphs, requiring O(V + E) space.
c

Write a program to sort an array of integers using selection sort.

4 marks

Answer

Sign in to view the complete answer paper.

d

Insert 02, 36, 09, 06, 14, 27, 28 into BST.

4 marks

Answer

Sign in to view the complete answer paper.

e

What is dynamic programming? When to apply it.

4 marks

Answer

Sign in to view the complete answer paper.

Part B

2

Explain the Operations on Doubly Linked Lists.

8 marks

Answer

Sign in to view the complete answer paper.

OR
38 marks
a

List and explain the applications of stack ADT.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write an algorithm to find the sum of n-numbers and also analyze its time complexity.

4 marks

Answer

Sign in to view the complete answer paper.

4

Differentiate between BFS and DFS traversals. Take an example graph and implement the BFS traversal.

8 marks

Answer

Sign in to view the complete answer paper.

OR
58 marks
a

Define tree and what are the properties of trees?

4 marks

Answer

Sign in to view the complete answer paper.

b

Explain the different types tree traversals.

4 marks

Answer

Sign in to view the complete answer paper.

68 marks
a

Explain the worst-case time complexity in the quick sort.

4 marks

Answer

Sign in to view the complete answer paper.

b

Explain the different types of Hash functions are used in hashing.

4 marks

Answer

Sign in to view the complete answer paper.

OR
7

Perform heap sort algorithm for (10 15 6 2 25 18 16 2 20 4).

8 marks

Answer

Sign in to view the complete answer paper.

8

Define AVL trees. Explain the rotations involved in balancing an unbalanced AVL tree.

8 marks

Answer

Sign in to view the complete answer paper.

OR
98 marks
a

Write the insertion algorithm of red-black tree. Also analyze its time complexity.

4 marks

Answer

Sign in to view the complete answer paper.

b

What are properties of B-Tree.

4 marks

Answer

Sign in to view the complete answer paper.

10

Compare the Standard Tries and Compressed Tries with an example.

8 marks

Answer

Sign in to view the complete answer paper.

OR
11

State and explain the Knuth-Morris-Pratt algorithm with an example.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of DATA STRUCTURES AND ALGORITHMS from JNTUH for MCA 2019 II, December 2019, R13.

For the question paper without answers, switch to the Question Paper tab.

Other papers in DATA STRUCTURES AND ALGORITHMS

Loading Question Papers

Fetching data from database...