1. SRI VASAVI COLLEGE, ERODE
SELF FINANCE WING
DEPARTMENT OF COMPUTER SCIENCE
II –B.Sc. Computer science
DATA STRUCTURE QUESTION BANK
ALL FIVE UNITS
MCQ WITH ANSWERS
IMPORTANT QUESTIONS
UNIVERSITY QUESTION PAPER.
2. SUBJECT NAME: DATA STRUCTURE MCQ FOR ALL FIVE UNITS
1. A linear of elements in which
deletion can be done from one end
(front) and insertion can take place
only at the other end (rear) is
known as____
a)Queue b)stack c)tree d)
linked list
2. LIFO stands for
a) list of outputs b) last in first
out c) first in first out d) none of
them
3. Circular queue is also known
as______
a) ring buffer b)square
buffer c) rectangle buffer
d)curve buffer
4. A queue follows_____
a) FIFO b) LIFO c)
ordered array d)linear
tree
5. A data structure in which
elements can be inserted or deleted
at I from both ends but not in the
middle is_____
a) queue b) circular queue c)
dequeue d) priority queue
6. In stack , insertion operation is
known as __
a) pop b) push c) top
7. whereas deletion operation is
known as ___
a) pop b) push c)top
8. In queue insertion operation is
known as____
a) Enqueue b) Dequeue
9. In queue deletion operation is
known as____
a)Enqueue b) Dequeue
10. In a queue the initial values of
front pointer f rare pointer r should
be__and__ respectively.
a) 0 and 1 b) 0 and -1 c) -1
and 0 d)1 and 0
11. which of them is an abstract
datastructure (ADT) ?
A)stacks b)function c) queues d) both A
and C
12. The term push and pop is related
to ______
a)queue b) stack c) both d) none
13. A normal queue if implemented
using an array of size MAX_SIZE
gets full when?
a)REAR = MAX_SIZE-1
b)Front=(rear+1)mod MAX_SIZEC )
Front=rear+1D ) Rear = front
14. 14. stack can be implemented
using_____
a) array and binary tree b)linked
list and graph c) array and linked
listd)queue and linked list
15. postfix from of following
expression D+(E*F)
a) EF*D+ b) DEF*+ c)DEF+*
d) EFD*+
16. What is node?
A node is a basic unit of a data
structure, such as a linked list or
tree data structure. Nodes contain
data and also may link to other
nodes
17. Define garbage collection.-
Garbage collection is the
systematic recovery of pooled
computer storage that is being
used by a program
18. Define tree.- A tree is a
hierarchical data structure defined
as a collection of nodes.
19. Define Binary tree ?A binary tree
is a tree-type non-linear data
structure with a maximum of
two children for each parent.
20. What is Stack.- A stack is an
abstract data type that holds an
ordered, linear sequence of items
21. Define Queue.- A Queue is a
linear structure which follows a
particular order in which the
operations are performed.
22. What will be the number of passes
to sort the elements using insertion
sort?14, 12,16, 6, 3, 10
1
3. A) 6 B) 5 C) 7 D) 1
23. What is the running time of an
insertion sort algorithm if the input
is pre-sorted?
A) O(N2)B) O(N log N)C) O(N)D)
O(M log N)
24. Which of the following real time
examples is based on insertion
sort?
A) arranging a pack of playing
cardsB) database scenarios and
distributes scenarios
C) arranging books on a library
shelfD) real-time systems
25. Which of the following sorting
algorithms is the fastest for sorting
small arrays?
A) Quick sort B) Insertion sort C)
Shell sort D) Heap sort
26. In what time can a binary heap be
built?
a)O(N)b) O(N log N) c) O(log N)
d) O(N2)
27. Heap sort is faster than Shell sort.
a) true b) false
28. Consider the following heap after
bulid heap phase. What will be its
corresponding array?
a) 26,53,41,97,58,59,31b)
26,31,41,53,58,59,97c)
26,41,53,97,31,58,59
d) 97,53,59,26,41,58,31
29. Quick sort is a __________
a) greedy algorithmb) divide and
conquer algorithm
c) d) Oynamic programming
algorithm d) backtracking
algorithm
30. What is the worst case time
complexity of the Quick sort?
a) O(nlogn)
b) O(n)
c) O(n3
)
d) O(n2
)
31. The best case behaviour occurs for
quick sort is, if partition splits the
array of size n into __________
a) n/2 : (n/2) – 1
b) n/2 : n/3
c) n/4 : 3n/2
d) n/4 : 3n/4
32. Shell sort is also known as
_____________
a) diminishing decrement sort
b) diminishing increment sort
c) partition exchange sort
d) diminishing insertion sort
33. Shell sort is applied on the
elements 27 59 49 37 15 90 81 39
and the chosen decreasing
sequence of increments is (5,3,1).
The result after the first iteration
will be
a) 27 59 49 37 15 90 81 39
b) 27 59 37 49 15 90 81 39
c) 27 59 39 37 15 90 81 49
d) 15 59 49 37 27 90 81 39
34. Shell sort is an improvement on
____
a) insertion sort
b) selection sort
c) binary tree sort
d) quick sort
35. Shell sort is more efficient than
insertion sort if the length of input
arrays is small.
a) Trueb) False
36. Who invented the shell sort
algorithm?
a) John Von Neumannb) Donald
Shell c) Tony Hoare d) Alan Shell
37. The number of edges from the root
to the node is called Depth of the
tree.
38. The number of edges from the node
to the deepest leaf is called _Height
of the tree. ()
2
4. 39. The number of edges in a complete
graph of n vertices is (n(n-1)/2)
40. A graph is a tree if and only if
graph is (Contains no cycles)
41. A vertex of in-degree zero in a
directed graph is called a/an Sink
42. What is the maximum number of
children that a node can have in a
binary tree?Ans 2
43. A Binary Tree can have
A. Can have 2 childrenB. Can have
1 childrenC. Can have 0 children D.
All of the above
44. A connected planar graph having 6
vertices, 7 edges contains ___3__
regions.
45. How many common operations
are performed in a binary tree?
Ans 2
46. What is a full binary tree?
a) Each node has exactly zero or
two children b) Each node has
exactly two children
c) All the leaves are at the same
level d) Each node has exactly one
or two children
47. What is a complete binary tree?
a) Each node has exactly zero or
two children
b) A binary tree, which is
completely filled, with the possible
exception of the bottom level,
which is filled from right to left
c) A binary tree, which is
completely filled, with the possible
exception of the bottom level,
which is filled from left to right
d) A tree In which all nodes have
degree 2
48. Which type of data structure does
rope represent?
a) Array b) Linked List c) Queue d)
Binary Tree
49. What is a threaded binary tree
traversal?
a) a binary tree traversal using
stacks
b) a binary tree traversal using
queues
c) a binary tree traversal using
stacks and queues
d) a binary tree traversal without
using stacks and queues
50. In a simple graph, the number
of edges is equal to twice the
sum of the degrees of the
vertices.
a) True b) False
51. A connected planar graph
having 6 vertices, 7 edges
contains _____ regions.
a) 15 b) 3 c) 1 d) 11
52. Which of the following properties
does a simple graph not hold?
a) Must be connected b) Must be
unweighted c) Must have no
loops or multiple edges d) Must
have no multiple edges
53. Which of the following is true?
a) A graph may contain no edges
and many vertices
b) A graph may contain many
edges and no vertices
c) A graph may contan no edges
and no vertices
d) A graph may contain no
vertices and many edges
54. In which of the following case
does a Binary Decision Diagram
is used for?
a) Representation of Boolean
Functions
b) String Matching
c) Searching
d) Sorting of number
55. In a simple graph, the number of
edges is equal to twice the sum of
the degrees of the vertices.
a) True
b) false
3
5. FIVE MARKS AND EIGHT
MARKS IMPORTANT
QUESTION
UNIT –I
1. Explain analysis of algorithm
2. What is circular queue and their
advantages
3. Explain QUEUE MODEL
4. Explain linked stack and queue
model
5. Write short notes on sparse
matrices
6. Explain Representation of array in
detailed.
7. Explain sparse matrix in detailed.
8. Explain stack and queue model in
detail
9. Explain Circular Queue in
detailed.
10. Explain Infix to Postfix
Conversion in detailed.
11. Explain Multiple Stacks and
Queues in detailed.
UNIT II
1. Explain the linked stacks with
algorithms
2. Explain the storage management
3. Describe the polynomial addition
with an algorithm
4. Explain the Queue with an
algorithm
5. Discuss the analysis of algorithm.
6. Linked Stacks and Queue
7. Polynomial addition with an
algorithm
8. Dynamic storage Management
9. Garbage collection and storage
compaction
10. Insert and deletion a mode from
doubly linked list.
UNIT III
1. What is binary tree
2. What is path
3. What a tree traversal
4. What is graph
5. What is algorithm
6. Explain briefly the principle
of quick sort.
7. Write a brief node on sorting
on several keys.
8. Write short note on binary
tree traversal.
9. Write note on constructing
spanning tree using krukal’s
algorithm.
10.What is binary tree types of
representation in binary tree.
11.Algorithm for finding binary
spanning tree and connected.
12.Shortest path algorithm.
13.Explain Binary tree traversal
and threaded binary tree.
UNIT IV
1. Define Buffer
2. What is a Symbol table
3. Define Static tree table
4. Define Dynamic tree table
5. Define Hash Function
6. Define Hash table
7. Define Probing.
8. What is a Dynamic tree table?
Explain briefly
9. Write a brief notes on
Sequential Organization
10.What is Shell sort? Explain
11.What is a K-way merging?
Discuss
12.Write a short notes on
Magnetic tapes.
13.Explain Hash Function
4
6. 14.Write short note on K-way
Merging
15.Write Short notes on merging
tapes.
16.Explain Static & Dynamic
tree table.
17.Explain Over flow Handling
18.Explain OBS using on
Huffman algorithm.
UNIT V
1. Define file?
2. Explain insertion sort and
Quick sort?
3. Explain Divide Techniques
& conquer Techniques.
4. What is structure property?
5. Explain sequential file?
And Random Access file
in detailed.
6. Write a brief note on
simulation.
7. Write a brief note on
pattern matching
8. Write note on static tree
table.
9. Explain sequential
organization of files in
detailed?
5
8. 17.(a) Write to insert and delete node from
doubly linked list. Or
(b) Discuss in detail about Garbage
collection.
18.(a) Construct a binary search tree in
insertion the following data sequentially:
45,32,72,67,21,85,92,40 explain the steps
involved in it. Or
(b) Describe to implement left child
node siblings data structure For general
trees explain.
19. (a) Discuss in detail about Hashing
function. Or
(b) Discuss briefly about static tree
tables.
20. (a) Explain detail about shell short
with example. Or
(b) Discuss about fill organization.
BHARATHIAR UNIVERSITY B.Sc. Degree Examination, November -2013
SUBJECT NAME :DATA STRUCTURE
SECTION A-(10*1=10marks)
Answer all questions.
1. A ___________ is an ordered list in
which all insertion and deletion take place
at one end
a).Queue b).Circular queue
c).Stack d).List
2.Compiler can accept an expression
in____________ notation to produce
correct code.
a).Infix b).Postfix
c).Prefix d).None
3.The coefficients of two polynomials
should be added if the exponents
are__________
a) .Equal b).Not Equal
c).Zero d).None
4.____________ is a strategy to find a free
block whose size is as close to request size
of as possible
a).Best fit b).First fit
c)Worst fit d).None
5.Children of the same parent are said to
be ____________
a).Ancestors b).Forest
c)Siblings d).None
6.An n vertex undirected graph with
exactly ___________ edges is said to be
completed.
a).(n-1)/2 b).n(n-1)/2
c).n/2 d).n(n-1)
7.___________ is the time until the right
sector of the track is under the read/write
head.
a).Latency time b).Seek time
c).Transmission time d).None
8.The memory available to maintain the
symbol table is referred to as the
___________.
(a).Tree table b).Hash table
c).Symbol table d).None
9.The worst case computing time of heap
sort is _______________.
a).O(n log2 n) b).O(n2)
c).O(n) d).O(n log n)
10.Logical sequence of records is
generally different from the physical
sequence in _________ organization.
a).Sequential b).Linked
c).Random d).None
SECTION B-(5*5=25marks)
Answer all questions.
11.(a).How can we insert and delete
elements in the queue? Or
(b).Write about multiple stacks and
queues.
12.(a).Write the procedure to invert a list
and concatenate two list. Or
(b).Write about doubly linked list.
13.(a).Explain about threaded binary trees.
Or
(b).Short notes on transitive closure.
7
9. 14.(a).Explain k-way merging.
Or
(b).Give short notes on:
(i) Mid-square hashing function
(ii) Division hashing function.
15.(a). List out various internal sorting
methods Explain Shell sort.
Or
(b). Discuss in detail about sequential
organization of file.
SECTION C-(5*8=40marks)
Answer all questions.
16.(a).Discuss about arrays,Write
TRANSPOSE algorithm of sparse matrix.
Or
(b).Define expression How can we
convert expression from infix notation to
postfix notation?
17.(a).Explain polynomial addition .
Or
(b).Shortly describe dynamic storage
management.
18.(a).Define binary tree Explain binary
representation.
Or
(b).Discuss about adjacency matrix
,how to adjacency list representation of
graph.
19.(a).Elaborate on disk storage.
Or
(b).Discuss about static tree table.
20.(a).Explain the quick sort algorithm.
Or
(b).Explain Random access with
examples.
BHARATHIAR UNIVERSITY B.Sc. Degree Examination, April 2017
SUBJECT NAME :DATA STRUCTURE
SECTION A-(1*10=10marks)
Answer all questions.
Choose the correct answer:
1.____________ method is used to
compute the3 hash code of the key of the
data item.
a).Hashing b).Linked list
c).Trees d).Graph
2.a BST is traversed in the following order
recursively:Right,Root,Left.The output
sequence will be in_____________.
a).Ascending order b).Descending order
c).Biomic sequence d).No specific
order
3.the number of leaf nodes in a compete
binary tree od depth d is ____________.
a).2d b).2d-1+1 c).2d+1+1
d)2d+1
4.One can convert a binary tree into mirror
image by traversing it in
_______________.
a).in order b).pre order c).post order
d).any order
5.The quick sort algorithm exploit
______________.
a).Greedy b).Dynamic programming
c).Divide and conquer d).Back tracking
6.Which of the following sorting
algorithms does not have a worst case
running time of 0(n2)?.
a).Insertion sort b).Merge sort
c).Quick sort d).Bubble sort
8
10. 7.Merging 4 sorted file containing
50,10,25 and15 records will take
____________ time.
a). 0(100) b).0(200)
c).0(175) d).0(125)
8.The searching technique that takes 0(1)
time to find a data is ____________.
a).Linear search b).Tree search
c).Hashing d).Binary search
9.Stack is also called as
_________________.
a). Last in first out b).First in last out
c).Last in last out d).First in first out
10.___________________ is not the
component of data structure.
a).Operations b).Storage structures
c).Algorithms d). None of the above
SECTION B-(5*5=25marks)
Answer all questions.
11.(a).What do you think about stack?
Give some applications of stack.
Or
(b).Explain what is circular queue?
How do you check the queue full
condition?
12.(a).Write a short note on storage
management.
Or
(b).Write a algorithm to delete a node
from doubly linked list.
13.(a).Construct a binary tree for
expressions.
(i) ((a*b+c)*d)
(ii) A-B*C/D.
Or
(b).Explain the steps involved in
converting a general tree to abinary tree
with example.
14.(a).Explain in detail about hash
functions.
Or
(b).Write a short note on magnetic
tapes.
15.(a).Write the algorithm for merge sort.
Or
(b).Write a short note on sequential
organizations.
SECTION C-(5*8=40marks)
Answer all questions.
16.(a).Explain multiple stack and its
operations Give examples with neat
diagram.
Or
(b).Write a detailed note on algorithm
and explain the steps to analysis the
algorithms.
17.(a).Explain and write an algorithm to
insert and delete a node from singly linked
list.
Or
(b)Explain in detail about Garbage
collection.
18.(a).Write about the various
representations of the binary tree in detail
with suitable example.
Or
(b).Explain in detail about shortest paths
algorithm with an example.
19.(a).Explain the random access with
examples.
Or
(b).Explain the quick sort algorithm.
20.(a).Elaborate on disk storage.
Or
(b).Discuss about static tree table.
9