0% found this document useful (0 votes)
242 views7 pages

CS 302 PDF

This document contains a test paper on data structures and algorithms with the following structure: 1. Multiple choice questions with 10 questions worth 1 mark each. 2. Short answer questions with 3 questions worth 5 marks each. 3. Long answer questions with 3 questions worth 15 marks each. The questions cover topics like data structures, algorithms, trees, graphs, sorting, hashing and complexity analysis. Candidates are required to answer the questions in their own words as far as possible. The test aims to evaluate the understanding of concepts and their application to problems in the given time of 3 hours.

Uploaded by

Maz Har Ul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
242 views7 pages

CS 302 PDF

This document contains a test paper on data structures and algorithms with the following structure: 1. Multiple choice questions with 10 questions worth 1 mark each. 2. Short answer questions with 3 questions worth 5 marks each. 3. Long answer questions with 3 questions worth 15 marks each. The questions cover topics like data structures, algorithms, trees, graphs, sorting, hashing and complexity analysis. Candidates are required to answer the questions in their own words as far as possible. The test aims to evaluate the understanding of concepts and their application to problems in the given time of 3 hours.

Uploaded by

Maz Har Ul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Name : ……………………………………………………………

htt
Roll No. : ………………………………………………………..
Invigilator’s Signature : ………………………………………..

CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13


p:/
2012
DATA STRUCTURE & ALGORITHMS
Time Allotted : 3 Hours Full Marks : 70
/q
The figures in the margin indicate full marks.
pap
Candidates are required to give their answers in their own words
as far as practicable.

GROUP – A
er.

( Multiple Choice Type Questions )

1. Choose the correct alternatives for any ten of the following :

10 1 = 10
wb

i) Reserve Polish notation is often known as

a) Infix b) Prefix
ut .

c) Postfix d) none of these.

ii) Which of the following algorithm should execute the


slowest for large values of N ?
a c.

a) 0(N) b) 0( N2)

c) 9 ( log 2 N ) d) None of these.


in

3202 (N) [ Turn over


CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13

iii) The evaluation of the postfix expression


htt
3, 5, 7, , + , 12, % is

a) 2 b) 3
p:/
c) 0 d) 3·17.

iv) A machine needs a minimum of 100 sec to sort


/q
1000 names by quick sort. The minimum time needed

to sort 100 names will be approximately


pap
a) 72·7 sec b) 11·2 sec

c) 50·2 sec d) 6·7 sec.

v) Linked list are not suitable for


er.

a) Stack b) Deque

c) AVL Tree d) Binary search.


wb

vi) What will be the time complexity for selection sort to

sort an array of n elements ?

a) O ( log n ) b) O ( n log n )
ut .

c) O( n) d) O ( n 2 ).

vii) The depth of a complete binary tree with n nodes


a c.

a) log ( n + 1 ) – 1 b) log ( n )

c) log ( n – 1 ) + 1 d) log ( n ) + 1.
in

3202 (N) 2
CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13

viii) In a binary search tree, if the number of nodes of a


htt
tree is 9, then the minimum height of the tree is

a) 9 b) 5
p:/
c) 4 d) none of these.

ix) Dynamic memory allocation use


/q
a) Calloc b) Malloc
pap
c) Free d) all of these.

x) A vertex with degree one in.a graph is called

a) Leaf
er.

b) Pendant vertex

c) End vertex
wb

d) None of these.

xi) Adjacency matrix of a diagraph is


ut .

a) Identity matrix

b) Symmetric matrix
a c.

c) Asymmetric matrix

d) None of these.
in

3202 (N) 3 [ Turn over


CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13

xii) Which method of traversal does not use stack to hold


htt
nodes that are waiting to be processed :

a) Breadth-first
p:/
b) Depth-first

c) D-search
/q
d) None of these.
pap

GROUP – B
( Short Answer Type Questions )
Answer any three of the following. 3 5 = 15

2. a) Define big O notations.


er.

b) T ( n ) = 4n 2 + 3n log n, express T ( n ) in Big ( O )


notations. 2+3
wb

3. a) How the polynomial 4x 3 – 10x 2 + 3 can be represented


using a linked list ?

b) Compare and contrast between an array and a single


ut .

linked list. 2+3

4. a) Consider the array int a [ 10 ] [ 10 ] and the base


address 2000, then calculate the address of the array
a c.

a [ 2 ] [ 3 ] in the row and column major ordering.

b) Write the advantage of circular queue over linear


in

queue. 3+2

3202 (N) 4
CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13

5. What do you mean by recursion ? Write down a C function


htt
to find out the GCD of two nos. using recursive technique.

1+4

6. What is binary tree ? Construct a binary tree using the


p:/
inorder and postorder traversal of the node given below :

Inorder : D B F E A G C L J H K
/q
Postorder : D F E B G L J K H C A
1+4
pap

GROUP – C
( Long Answer Type Questions )
Answer any three of the following. 3 15 = 45
er.

7. a) Draw a minimum heap tree from the below list :

12, 11, 7, 3, 10, – 5, 0, 9, 2


wb

Now do the heap sort operation over the heap tree

which you have formed. Write the insertion sort

algorithm. 2+2+3
ut .

b) What is a minimum spanning tree ? Describe Huffman’s

Algorithm. 3+4
a c.

c) What are the differences between AVL Tree & Binary

Search Tree ? 1
in

3202 (N) 5 [ Turn over


CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13

8. a) Radix Sort the following list :


htt
189, 205, 986, 421, 97, 192, 535, 839, 562, 674

Write the Radix sort algorithm. 3+5


p:/
b) Find the time complexity of Binary Search Algorithm. 4

c) What is hashing ? 3
/q
9. a) Construct an AVL tree using the below list. Show all the
pap
steps 12, 11, 13, 10, 09, 15, 14, 18, 7, 6, 5, 4. 5

b) What is a priority queue ? 3

c) Write the recursive algorithm to find x V n. 4


er.

d) Find the postfix notation of

(a+b x ) \ ( a ! – d ) s – c V y ( show all steps ). 3


wb

10. a) Write the advantage of circular queue over linear

queue. 4
ut .

b) What is a self referential structure ? 2+2

c) Describe a string reversal algorithm. 3


a c.

d) Write the difference between a[ ] [ ] and a. 2

e) What is difference between Union & Structure ? 2


in

3202 (N) 6
CS/B.TECH/CSE (N)/IT (N)/SEM-3/CS-302/2012-13

11. Write short notes on any three of the following : 3 5


htt
a) Abstract Data type

b) BFS
p:/
c) BTree

d) Tail recursion
/q

e) Merge Sort.
pap
er.
wb
ut .
a c.
in

3202 (N) 7 [ Turn over

You might also like