Data structures and Algorithms MCQs and Quiz
Identify the data structure which allows deletions at both ends of the list but insertion at only one end.
Option 1
|
Priority queues |
Option 2
|
Output-restricted deque |
Option 3
|
Input-restricted deque Correct |
Option 4
|
None of these |
The depth of a complete binary tree is given by
Option 1
|
Dn = n log2n+1 |
Option 2
|
Dn = n log2n |
Option 3
|
Dn = log2n+1 Correct |
Option 4
|
Dn = log2n |
The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
Option 1
|
ABFCDE |
Option 2
|
ADBFEC |
Option 3
|
ABDCEF |
Option 4
|
ABDECF Correct |
In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for efficiency. These special pointers are called
Option 1
|
thread Correct |
Option 2
|
path |
Option 3
|
branch |
Option 4
|
leaf |
Arrays are best data structures
Option 1
|
for the size of the structure and the data in the structure are constantly changing |
Option 2
|
for relatively permanent collections of data Correct |
Option 3
|
None of these |
Option 4
|
All of these |
Each array declaration need not give, implicitly or explicitly, the information about
Option 1
|
the index set of the array |
Option 2
|
the name of array |
Option 3
|
the data type of array |
Option 4
|
the first data from the set to be stored Correct |
The time factor when determining the efficiency of algorithm is measured by
Option 1
|
Counting the number of statements |
Option 2
|
Counting micro seconds |
Option 3
|
Counting the number of key operations Correct |
Option 4
|
Counting the kilobytes of algorithm |
Which of the following case does not exist in complexity theory
Option 1
|
Average case |
Option 2
|
Null case Correct |
Option 3
|
Best case |
Option 4
|
Worst case |
. The Worst case occur in linear search algorithm when____.
Option 1
|
Item is somewhere in the middle of the array |
Option 2
|
Item is the last element in the array or is not there at all Correct |
Option 3
|
Item is the last element in the array |
Option 4
|
Item is not in the array at all |
The complexity of Binary search algorithm is
Option 1
|
O(n) Correct |
Option 2
|
O(log ) |
Option 3
|
O(n log n) |
Option 4
|
O(n2) |