You are on page 1of 1

JAHANGIRNAGAR UNIVERSITY

Department of Computer Science and Engineering


PMSCS Semester Final Examination, Spring 2020
Course ID: PMSCS 604 (Data Structures)
Time allowed: 1.5 Hrs. Full Marks: 30

Answer any THREE questions.

1. 3+3+4
a) Describe different notations used in presenting algorithms.
b) Discuss various string operations with examples.
c) Consider the text T = abcaabaaca and the pattern P = abaa. Apply the second pattern
matching algorithm to find the pattern P in T.

2. 5+5
a) Sort the following numbers using Shell sort algorithm:
18, 19, 37, 23, 40, 29, 30
b) Suppose the following sorted 13-elements are stored in an array A:
A: 11, 22, 30, 33, 40, 44, 55, 60, 66, 77, 80, 88, 99
Now apply the binary search to the array A for i) ITEM=45 and ii) ITEM=99

3. 3+4+3
a) Briefly describe the memory representation of linked list.
b) Define memory allocation and garbage collection. Describe with figure how an item
is deleted from a linked list.
c) What is a two-way list? Discuss briefly.

4. 4+6
a) Build a min heap for the following numbers:
44, 30, 50, 22, 60, 55, 77, 55.
b) Define AVL tree. Construct the AVL tree by inserting the following data:
17, 11, 7, 53, 4, 13, 12, 8, 60, 19

Page 1 of 1

You might also like