Data structures and Algorithms MCQs and Quiz
. In a graph if e=[u, v], Then u and v are called
Option 1
|
neighbors |
Option 2
|
endpoints of e |
Option 3
|
adjacent nodes |
Option 4
|
|
In a Heap tree:
Option 1
|
Values in a node is greater than every value in children of it |
Option 2
|
Values in a node is greater than every value in left sub tree and smaller than right sub tree |
Option 3
|
Both of these |
Option 4
|
None of these |
A connected graph T without any cycles is called
Option 1
|
a tree graph |
Option 2
|
a tree |
Option 3
|
free tree |
Option 4
|
All of these |
A binary tree can easily be converted into q 2-tree
Option 1
|
by inserting an internal nodes for non-empty node |
Option 2
|
by replacing each empty sub tree by a new internal node |
Option 3
|
by inserting an external nodes for non-empty node |
Option 4
|
by replacing each empty sub tree by a new external node |
Which of the following data structure is non-linear type?
Option 1
|
Strings |
Option 2
|
Lists |
Option 3
|
Stacks |
Option 4
|
none of these |
The depth of a complete binary tree is given by
Option 1
|
Dn = n log2n |
Option 2
|
Dn = n log2n+1 |
Option 3
|
Dn = log2n |
Option 4
|
Dn = log2n+1 |
memory address of the first element of an array is called
Option 1
|
floor address |
Option 2
|
first address |
Option 3
|
foundation address |
Option 4
|
base address |
The memory address of fifth element of an array can be calculated by the formula
Option 1
|
LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array |
Option 2
|
LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array |
Option 3
|
LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array |
Option 4
|
None of these |
Which of the following is not a limitation of binary search algorithm?
Option 1
|
must use a sorted array |
Option 2
|
requirement of sorted array is expensive when a lot of insertion and deletions are needed |
Option 3
|
there must be a mechanism to access middle element directly |
Option 4
|
binary search algorithm is not efficient when the data elements are more than 1000 |
Two dimensional arrays are also called
Option 1
|
tables arrays |
Option 2
|
matrix arrays |
Option 3
|
Both of these |
Option 4
|
None of these |