0% found this document useful (0 votes)
36 views

Bca Bca 302 Data Structure With C 2011

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Bca Bca 302 Data Structure With C 2011

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

http://www.makaut.

com

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

CS/BCA/SEM-3/BCA-302/2011-12

2011
DATA STRUCTURE WITH C
Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words
as far as practicable.

GROUP – A
( Multiple Choice Type Questions )
1. Choose the correct alternatives for any ten of the following :
10 × 1 = 10
i) Let q be the queue of integers defined as follows :
#define MAX10
struct queue
{ int data [MAX];
int rear, front;
} q;
To insert an element into the queue, we may write operation
a) ++q.data[q.rear]=x;
b) q.data[q.rear]++=x;
c) q.data[++q.rear]=x;
d) none of these.
ii) The tree traversal technique in which the root is
traversed after its children is known as
a) post-order traversal b) pre-order traversal
c) in-order traversal d) none of these.

3131 [ Turn over


CS/BCA/SEM-3/BCA-302/2011-12

iii) Number of possible binary tree with 4 node is


a) 14 b) 34
c) 24 d) none of these.
iv) Number of nodes in a complete binary tree of depth k is
k
a) 2k b) 2

c) 2k – 1 d) none of these.
v) The best case complexity of insertion sort is
a) O ( n2 ) b) O ( log n )
c) O(n) d) O ( n log n ).
vi) Graph is a
a) linear data structure
b) non-linear data structure
c) either (a) or (b) depending on situation
d) none of these.
vii) Stack works on
a) LIFO b) FIFO
c) both (a) and (b) d) none of these.
viii) A linked list follows
a) random access mechanism
b) sequential access mechanism
c) no access mechanism
d) none of these.
ix) The best data structure to see whether an arithmetic
expression has balanced parenthesis is a
a) stack b) queue
c) tree d) list.
x) The total number of comparisons in bubble sort is
a) O ( n log 2n ) b) O ( 2n )
n
c) O ( n2 ) d) O ( 2 ).

3131 2
CS/BCA/SEM-3/BCA-302/2011-12

xi) The sparse matrix is a matrix whose


a) most of the elements are non-zero
b) half of the elements are zero and half of the
elements are non-zero
c) most of the elements are zero
d) none of these.
xii) The prefix notation is also known as
a) reverse notation b) reverse polish notation
c) polish notation d) none of these.
GROUP – B
( Short Answer Type Questions )
Answer any three of the following 3 × 5 = 15
2. What is Data structure ? What is ADT ? Explain with an
example.
3. What is circular queue ? How is it different from queue ?
What advantage do we get from circular queue over ordinary
queue ?
4. Convert the following infix expression into postfix form by
using stack :
a+b*c–(d–e*f)/g
5. What is Linked List ? What are its advantages over array ?
What are its disadvantages over array ? 1+2+2
6. Distinguish between DFS and BFS. Indicate their time
complexities. 4+1
GROUP – C
( Long Answer Type Questions )
Answer any three of the following. 3 × 15 = 45
7. a) What is binary search tree ? 2
b) Construct the binary search tree if the elements are in
the order :
60, 75, 25, 66, 50, 55, 45, 40, 35, 57, 30 4

3131 3 [ Turn over


CS/BCA/SEM-3/BCA-302/2011-12

c) Delete the following nodes in order and show each step :


i) Node with 55
ii) Node with 66
iii) Node with 50. 3+3+3
8. Write short notes on any three of the following : 3×5
a) De-queue
b) Non-linear data structure
c) Hashing
d) Priority queue.
9. a) Define General tree. Write an algorithm to convert a
General tree into a binary tree. 7
b) Define B-tree. Construct a B-tree of order 5 from the
following key values :
a, g, f, b, k, d, h, m, j, e, s, i, r, x, c, l, n, t, u, p.
Also delete h, r, p, d. 8
10. Write the functions of the following :
a) Insert a node after a particular node in a Single Linked
List. 5
b) Reverse display of the list elements in a Doubly Linked
List. 5
c) Physically reverse the Single Linked List. 5
11. a) Write a C function for selection sort. 6
b) How does binary search give benefit over sequential
search ? 3
c) Explain the divide and conquer rule with example. 6
=============

3131 4

You might also like