Font size
WorksheetsDATASTRUCTURES-3SEM
Total questions: 25
Worksheet time: 14mins
In the __________traversal we process all of a vertex’s descendents before we move to an adjacent vertex.
Depth First
Breadth First
With First
Depth Limited
The disadvantage in using a circular linked list is __________
it is possible to get into infinite loop
last node points to fist node.
time consuming
requires more memory space.
A graph is a collection of nodes, called __________ And line segments called arcs or__________ that connect pair of nodes.
vertices, edges
edges, vertices
vertices, paths
graph node, edges
State true of false.
i) A node is a parent if it has successor nodes.
ii) A node is child node if out degree is one.
True, True
False, True
True, False
False, False
TREE[1]=NULL indicates is _____________
Overflow
Empty
Underflow
Full
A terminal node in a binary tree is called __________
Root
Branch
Child
Leaf
If node N is a terminal node in a binary tree then its ________
Right tree is empty
Left tree is empty
Both left & right sub trees are empty
Root node is empty
Other name for directed graph is _________
Direct graph
Digraph
Dir-graph
Dgraph
(a) are used to represent networks. The networks may include paths in a city or telephone network or circuit network.
What is the value of the ROOT node in this Tree?
35
24
42
20
Tree
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
the starting node in a rooted tree structure from which all other nodes branch off./
In preorder traversal of a binary tree the second step is ____________
traverse the right subtree
traverse the left subtree
traverse right subtree and visit the root
visit the root
Tree is ____data structure
Linear
Non linear
Array
List
The operation of processing each element in the list is known as
Sorting
Merging
Traversing
Searching
Which of the following is the infix expression?
ABC+*
+A*BC
A+B*C
None of the above
#define SIZE 11
void main()
{
int stack[SIZE];
int top=-1;
}
What would be the maximum value of the top that does not cause the overflow of the stack?
8
9
11
10
If the elements '1', '2', '3' and '4' are inserted in a queue, what would be the order for the removal?
1324
4321
3241
None of the above
Consider the following function.
int array()
{
if(isEmpty())
return 0;
else
{
int =q[front];
front++;
return n;
}
}
Which operation does the above code perform?
a. Enqueue
b. Dequeue
c. Return the front element
d. add an element to front
e. add an element to rear
What will be the postfix expression for the following infix expression :
A + B * C ^ D
ABCD+*^
ABCD*+^
ABCD^*+
ABC+D*^
Data in the data structures are processed by operations like insertion, deletion, sorting, merging and
Traversing
Searching
Retrieval
Updating
Evaluate the following expression if the value of x=2, y=3 and z=1.
v = x + ––z + y++ +y
7
8
9
6
Give the output of the following expression:
a += a++ + ++a + – –a + a– –; when a = 7
31
39
34
37
Which notation is used for the following format:
Operand Operator Operand
Postfix
Prefix
Infix
None
