12

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation
Page 2: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation
Page 3: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

B O1110 Pages: 2

Page 1 of 2

Reg No.:_______________ Name:_____________________________________

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY SECOND SEMESTER REGULAR M.C.A. DEGREE EXAMINATION(R&S), MAY 2019

Course Code: RLMCA104

Course Name: DATA STRUCTURES

Max. Marks: 60 Duration: 3 Hours

PART A

Answer all questions, each carries 3 marks. Marks

1 Write algorithms to perform push and pop operations on a stack. (3)

2 What is a circular queue? How it is different from normal queue? (3)

3 What is the need for linked representation of lists? (3)

4 What is the node structure for doubly linked list? (3)

5 Write the algorithm for creating a binary search tree. (3)

6 Explain the adjacency list graph representation method with an example. (3)

7 State the advantage of binary search over linear search. (3)

8 What is the best, average and worst case complexity of Insertion and Selection

sorts?

(3)

PART B

Answer any one question from each module. Each question carries 6 marks.

Module I

9 Describe the different notations used to describe the asymptotic running time of

an algorithm.

(6)

OR

10 What is sparse matrix? How can you represent a sparse matrix using array?

Explain.

(6)

Module II

11 Write an algorithm for evaluating a postfix expression and evaluate the following

postfix expression using the algorithm AB+CD/AD-EA˄ + *+ where A=2, B=1,

C=6, D=2, E=4

(6)

OR

12 What is recursion? Write a recursive algorithm to find the nth Fibonacci number. (6)

Page 4: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

B O1110 Pages: 2

Page 2 of 2

Module III

13 Devise a representation for a queue where insertions and deletions can be made

at either end. Write functions for inserting and deleting at either end.

(6)

OR

14 What is a queue? Write the algorithm to perform insertion and deletion of

elements on a queue.

(6)

Module IV

15 Write an algorithm to interchange the mth and nth nodes (adjacent nodes) in a

singly linked list.

(6)

OR

16 How a linked list can be used to represent a polynomial 4x4+3x2+2x+1? Give an

algorithm to perform addition of two polynomials using linked list

(6)

Module V

17 Explain the BFS and DFS traversals of a graph with an example. (6)

OR

18 Describe the Kruskal’s algorithm for finding the minimum cost spanning tree. (6)

Module VI

19 Describe Quick sort algorithm using divide and conquer strategy. (6)

OR

20 Apply heap sort for the following unordered elements 2, 3, 81, 64, 4, 25, 36, 16,

9, 49

(6)

****

Page 5: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

Scanned by CamScanner

Page 6: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

Scanned by CamScanner

Page 7: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

Scanned by CamScanner

Page 8: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

Scanned by CamScanner

Page 9: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

Scanned by CamScanner

Page 10: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation

Scanned by CamScanner

Page 11: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation
Page 12: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Papers... · 2020. 7. 13. · 2 What is a circular queue? How it is different from normal queue? (3) 3 What is the need for lin ked representation