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

Second Semester Examination - 2008: B. Tech / MCA

The document is an exam for a data structures course covering topics like linear and non-linear data structures, binary trees, queues, stacks, graphs, sorting, and more. It consists of 8 pages with 10 questions worth a total of 70 marks. Students are asked to answer question 1, which is compulsory, and any 5 other questions. The questions test understanding of data structures and their implementation and applications.

Uploaded by

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

Second Semester Examination - 2008: B. Tech / MCA

The document is an exam for a data structures course covering topics like linear and non-linear data structures, binary trees, queues, stacks, graphs, sorting, and more. It consists of 8 pages with 10 questions worth a total of 70 marks. Students are asked to answer question 1, which is compulsory, and any 5 other questions. The questions test understanding of data structures and their implementation and applications.

Uploaded by

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

bputonline.

com

Total number of printed pages – 8 B. Tech / MCA (b) State applications for which binary tree is
BCSE 3102 / PCS 1001/PCS 1002
most suitable. Explain representation of
binary tree in linear array.
Second Semester Examination – 2008
(c) Describe ADT representation of queue
DATA STRUCTURE USING C
with commonly used functions.

Full Marks – 70 (d) Write the conditions to test ‘‘Queue is


Empty’’, ‘‘Queue is Full’’, and ‘‘Queue
Time : 3 Hours Contains ≥ 1’’ for a linear queue imple-
mented in linear array.
Answer Question No. 1 which is compulsory
and any five from the rest. (e) Explain the data structure used to repre-

Figures in the right hand margin sent a sparse matrix.

indicate marks. (f) Why do you have to check the full and
empty conditions of a STACK (imple-
1. Answer the following questions : 2 ×10
mented in linear array) ?
(a) Define data structure. What do you mean
(g) Define with example Height Balance Tree.
by ADT ? Define and differentiate between
What is the worst cases height of such
linear and non-linear data structures.
tree ?

P.T.O. BCSE 3102 / PCS 1001/PCS 1002 2 Contd.


bputonline.com

(h) What is a symbol table ? Which data 3. (a) Define linear queue. Let QUEUE be a
structure is most suitable to represent nonempty Queue implemented using
symbol table and Why ? linear array. Write a C program to delete

(i) What is path matrix of a Graph ? Discuss m elements from the QUEUE. 5

with relevent example. (b) Sketch the binary search tree resulting

(j) What is the process of topological sorting? from the insertion of the following integer

Explain how time complexity of topological keys: 39, 24, 12, 11, 43, 73, 26, 35, 29,

sorting algorithm, depends on the data 13, 6 5

structure used to represent the graph. (i) Is the tree almost complete ?
2. (a) Why do you have to check the full and (ii) Is the tree a AVL ?
empty conditions of a STACK ? Write a
(iii) What is the height of the sketched
C program to perform insertion and
tree ?
deletion in STACK that implemented using
an array. 5 (iv) Write the PREORDER traversal of
the sketched tree.
(b) Write a C program to convert a singly
linked list to circular linked list. Why 4. (a) Write an algorithm that computes the
header node is used in circular list ? number of elements and sum of elements
5 in a linear linked list. 5

BCSE 3102 / PCS 1001/PCS 1002 3 P.T.O. BCSE 3102 / PCS 1001/PCS 1002 4 Contd.
bputonline.com

(b) The in-order traversal of a tree produced 6. (a) Define a Graph. What are the different
the sequence D, B, H, E, A, I, F, J, C, representations of a Graph ? Use suitable
G and the pre-order traversal of the data structures to represent the following
same tree produced A, B, D, E, H, C, F,
directed graph in memory. 5
I, J, G. Draw the binary tree. Give a
linear array representation of the above
binary tree. Define a Node structure in A B C
C, which can be used to implement a
tree. 5 D
E F
5. (a) Describe a node structure of a doubly
linked list. Write an algorithm to delete
G I
the last node of a non-empty doubly
H
linked list. 5

(b) Define binary Heap. Explain the process


of Heap sort. Write an general algorithm (b) What are the preconditions to perorm
to construct a min heap. Construct min- BINARY SEARCH on a linear array ?
heap from the following list.
Write a recursive function in C to
{ 21, 6, 56, 61, 44, 7, 9, 76, 75, 32, 34, perform binary search on a linear array .
4, 49, 33 } 5 5

BCSE 3102 / PCS 1001/PCS 1002 5 P.T.O. BCSE 3102 / PCS 1001/PCS 1002 6 Contd.
bputonline.com

7. (a) Write an algorithm to perform DFS on a 8. (a) Use linked list to represent the following
graph. Find out the path from D to K polynomial

using DFS. 5 P (x, y, z) = 2xy2z3 + 3x2yz2 + 4xy3z +


5x2y2 + 8xy2z5 + 19 2.5
A B G
(b) Describe the data structure used to
represent a General tree. 2.5
D
C H I (c) Define circular queue. Sketch to explain
the placement of FORNT and REAR
E F pointers when Queue is Full and Queue
J K
Containing single element. 2.5

(d) Covert the following infix expression to post


M L
fix expression using STACK 2.5

(C – D ) + ( E AF ) + F / (H + W) * A AB.
(b) Write a program in C to sort a list of
floating point numbers (stored in a linear
array) using quick sort. In quick sort, why ––––––––––

the pivot is chosen from the center of the


list rather than from one end ? 5

BCSE 3102 / PCS 1001/PCS 1002 7 P.T.O. BCSE 3102 / PCS 1001/PCS 1002 8 –C

You might also like