Professional Documents
Culture Documents
For following input strings{Fire, Figure, Fight, firm, Fictures, Fit}, what is the
longeat common prefix?
A. Fi
B. F
C. Null
D. Fir
ANSWER: C
Which of the following technique will suite for finding square root a number?
A. Binary Search
B. Linear search
C. Sequential Search
D. Indexed Sequential Search
ANSWER: A
Which of the following technique will suite for finding the longeat common prefix?
Options: (i) Linear search (ii) Binary and linear search (iii) Binary Search (iv)
Sorting techniques.
A. (i) only
B. (iii) only
C. (ii) and (iv)
D. (iii) and (iv)
ANSWER: B
Which of the following sorting will finds maximum or minimum element from the given
set in the sorting iteration?
A. Bubble sort
B. Insertion Sort
C. Selection Sort
D. Quick sort
ANSWER: C
Consider the indian cricket team player list given as input, while sorting those
names, if two successive names were used for comparison, then which sorting will
suit for this?
A. Bubble sort
B. Insertion Sort
C. Selection Sort
D. Quick sort
ANSWER: A
If sorted element given as an input for the insertion sort , then what is the time
complexity?
A. O(1)
B. O(n)
C. Omega(n)
D. Omega(1)
ANSWER: C
Which of the following uses the divide and conqure concepts in sorting? Options: (i)
Quick Sort (ii) Merge Sort (iii) Selection Sort (iv) Insertion Sort
A. (i) only
B. (ii) only
C. (i) and (ii)
D. (ii) and (iii)
ANSWER: C
For the follwing input set {india, covid, corona, positive, negative, mask, washing,
distance}, in that if we are selecting "negative" word and move that word to one
corner of the input set, based on this word, if we perfom sorting, then which
sorting will suit for this?
A. Bubble sort
B. Insertion Sort
C. Selection Sort
D. Quick sort
ANSWER: D
If There is a bigger problem is given then finding the solution is very difficult,
so divide the given problem into small pieces for finding the solution; after that
all soltions were combined, then which sorting will suit for this? Options: (i)
Quick Sort (ii) Merge Sort (iii) Selection Sort (iv) Insertion Sort
A. (i) only
B. (ii) only
C. (i) and (ii)
D. (ii) and (iii)
ANSWER: B
If two sorted array is given as input for sorting , then which sorting will suit for
this? Options: (i) Quick Sort (ii) Merge Sort (iii) Bubble Sort (iv) Insertion Sort
A. (i) only
B. (ii) only
C. (ii) and (iiI)
D. (i) and (ii)
ANSWER: B
In a tree, if there is no sibling node for a x-node then how many childrens of x's
parent?
A. 1
B. many child possible
C. 0
D. 2
ANSWER: A
In a tree, a node does not have parent node, then it is referred as?
A. Child node
B. Leaf node
C. Sibling node
D. Root node
ANSWER: D
Consider a tree, in level 0 there will only one node and in level 1, there will be
three nodes namely A, B, C. Then how many siblings of B node?
A. 1
B. can not calculate
C. 0
D. 2
ANSWER: D
Consider d is the last level in a tree, in that d level there will be the nodes like
M, N, O, P. What is the degree of a node N?
A. 1
B. can not calculate
C. 0
D. 3
ANSWER: C
In a binary tree, how many sibling may have by a node except root node?
A. 1
B. can not calculate
C. 0
D. 2
ANSWER: A
In a Binary tree, a node-X contains A as left child and B as right child. If we want
to insert Y will be the left child , then which o the following condition to
used?(Note: makenode is a function to create a dummy node)
A. X->left=makenode(Y)
B. X->left=Y
C. X->left=A->left=Y
D. can not insert
ANSWER: D
In a binary tree, a node set to be a parent node then it should contain two child in
it, which is called as?
A. Perfect Binary Tree
B. Full Binary Tree
C. Complete Binary Tree
D. Degenerate Binary Tree
ANSWER: B
In a binary tree, a node set to be a parent node then it should contain only one
child in it, which is called as?
A. Perfect Binary Tree
B. Full Binary Tree
C. Complete Binary Tree
D. Degenerate Binary Tree
ANSWER: D
Consider a tree which contains A will be the root node and B, C, D are children of A
. Then what is the Postorder for the tree (After coversion)?
A. ABCD
B. DCBA
C. ACBD
D. DBCA
ANSWER: B
Consider a tree which contains A will be the root node and B, C, D are children of
A. If we want to find inorder, preorder and postorder then which of the following
intermediate step is required?
A. No intermediate step required, directly we can find the inorder, preorder and
postorder
B. Tree to Binary Tree conversion
C. Left Root Right, Root Left Right, Left Right Root
D. None
ANSWER: B
Consider a tree which contains A will be the root node and B, C, D are children of
A. After binary tree conversion of tree, which will be the right child of A?
A. C
B. D
C. Null
D. B
ANSWER: C
For the follwing input set {india, covid, corona, positive, negative, mask, washing,
distance}, after BST construction, What is the degree of "distance" node?
A. 1
B. 2
C. 0
D. 3
ANSWER: C
In directed graph, there exist edge from u to v, then (i) u is the adjacency node to
v (ii) v is the adjacency node to u (iii) u is a dead node (iv) v is not an
adjacency to u
A. (i) only
B. (ii) only
C. (ii) and (iv)
D. (i) and (ii)
ANSWER: B
A graph does not have self loop and parallel edges then it said to be_____________
A. Simple graph
B. Acyclic graph
C. Cyclic grapg
D. Parallel graph
ANSWER: A