0% found this document useful (0 votes)
167 views4 pages

Adsa Unit-I Mcqs

The document contains a series of questions and answers related to algorithms, data structures, and specifically AVL and B-trees. Key concepts include algorithm definitions, time complexity, asymptotic notations, and properties of AVL and B-trees. The document serves as a quiz or study guide for understanding these computer science topics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views4 pages

Adsa Unit-I Mcqs

The document contains a series of questions and answers related to algorithms, data structures, and specifically AVL and B-trees. Key concepts include algorithm definitions, time complexity, asymptotic notations, and properties of AVL and B-trees. The document serves as a quiz or study guide for understanding these computer science topics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

The word ____________comes from the name of a Persian mathematician Abu Ja’far

Mohammed ibn-i Musa al Khowarizmi


A. Algorithm
B. Flowchart
C. Syntax
D. None
ANSWER: A
When an algorithm is written in the form of a programming language, it becomes a
_________
A. Flowchart
B. Pseudo code
C. Program
D. Syntax
ANSWER: C
Any algorithm is a program
A. True
B. False
ANSWER: B
A procedure that calls itself is called
A. illegal call
B. reverse polish
C. recursive
D. none of the above
ANSWER: C
An algorithm is
A. a piece of code to be executed.
B. a loosely written code to make final code.
C. a step by step procedure to solve problem.
D. all of the above.
ANSWER: C
What should be considered when designing an algorithm?
A. If this software is used correctly
B. In the hardware is used correctly
C. If there is more than one way to solve the problem
D. All of the above are correct
ANSWER: C
What is time complexity of fun()?
int fun(int n)
{
int count = 0;
for (int i = n; i > 0; i /= 2)
for (int j = 0; j < i; j++)
count += 1;
return count;
}
A. O(n2)
B. O(n*log(n))
C. O(n)
D. O(n*log(n*Log(n)))
ANSWER: B
Asymptotic notations are used to describe the running time of an algorithm
A. True
B. False
ANSWER: A
Which of the following asymptotic notations is used to provide lower bound
constraint?
A. O
B. Ɵ
C. Ω
D. More than one of the above
ANSWER: C
Identify the two types of efficiencies that are important for computer algorithms.
A. Time efficiency and Higher power efficiency
B. Higher power efficiency and Computational efficiency
C. Computational efficiency and Space efficiency
D. Space efficiency and Time efficiency
ANSWER: D
AVL Trees – Creation, Insertion, Deletion operations and Applications
A. RL and RR
B. LR and RL
C. LL and RR
D. None of the above
ANSWER: B
What is balance factor of an AVL tree?
A. |h(TL) + h(TR)| ≤ 1
B. |h(TL)| ≤ 1
C. |h(TL) - h(TR)| ≤ 1
D. None of these
ANSWER: C
(AVL) tree is a ____________ tree.
A. binary search
B. height-balanced binary search
C. binary
D. None of the above
ANSWER: B
In an AVL tree, a single insertion may cause at most ___ rotations in the worst
case.
A. 1
B. 2
C. 3
D. 4
ANSWER: B
In an AVL tree, a single deletion may cause ______ rotations in the worst case.
A. zero
B. single
C. multiple
D. None
ANSWER: C
The following formular is of:
left_subtree (keys) ≤ node (key) ≤ right_subtree (keys)
A. Binary Search Tree
B. Bianry Tree
C. Complete Binary Tree
D. All of the above
ANSWER: A
AVL stands for Adelson-Velskii and Landis
A. True
B. False
ANSWER: A
Every AVL tree is a binary search tree, but every binary search tree may or may not
become as AVL tree.
A. True
B. False
ANSWER: A
What is the maximum height of any AVL tree with 7 nodes? Assume that height of tree
with single
node is 0.
A. 2
B. 3
C. 4
D. 5
ANSWER: B
What will be the balancing factor of node 14 in an AVL tree when a node 13 is
deleted from it?
<img src="AVL.jpg" alt="AVL.jpg" title="AVL" width="183" height="209"
style="display: block; margin-left: auto; margin-right: auto; text-align:
center;"/>
A. BF(14) = 1
B. B(14) = 2
C. BF(14) = –2
D. BF(14) = –1
ANSWER: C
In ______ balance factor of a node is the difference between left subtree and right
subtree.
A. AVL tree
B. Red Black Tree
C. 2-3 Tree
D. Heap Tree
ANSWER: A
Which of the following is the most widely used external memory data structure?
A. AVL tree
B. B-tree
C. Red-black tree
D. Both AVL tree and Red-black tree
ANSWER: B
B-tree of order n is a order-n multiway tree in which each non-root node contains
__________
A. at most (n – 1)/2 keys
B. exact (n – 1)/2 keys
C. at least 2n keys
D. at least (n – 1)/2 keys
ANSWER: D
A B-tree of order 4 and of height 3 will have a maximum of _______ keys.
A. 255
B. 63
C. 127
D. 188
ANSWER: A
B-tree and AVL tree have the same worst case time complexity for insertion and
deletion.
A. True
B. False
ANSWER: A
Five node splitting operations occurred when an entry is inserted into a B-tree.
Then how many nodes are written?
A. 14
B. 7
C. 11
D. 5
ANSWER: C
Compression techniques can be used on the keys to reduce both space and time
requirements in a B-tree.
A. True
B. False
ANSWER: A
Which of the following is true?
A. larger the order of B-tree, less frequently the split occurs
B. larger the order of B-tree, more frequently the split occurs
C. smaller the order of B-tree, more frequently the split occurs
D. smaller the order of B-tree, less frequently the split occurs
ANSWER: A
What is the best case height of a B-tree of order n and which has k keys?
A. logn (k+1) – 1
B. nk
C. logk (n+1) – 1
D. klogn
ANSWER: A
A B-tree used as an index for a large database table has four levels including the
root node. If a new key is inserted in this index, then maximum number of nodes
that could be newly created in the process is
A. 2
B. 3
C. 4
D. 5
ANSWER: D

You might also like