

MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
1. |
Which of the following false about Jump Search? |
A. | Jump Search is better than Linear Search |
B. | Useful when jumping back is more costly than jumping forward |
C. | Jump Search is worse than Binary Search |
D. | Jump search starts from the index 0 even though specified index is k |
Answer» E. | |
2. |
How can Jump Search be improved? |
A. | Start searching from the end |
B. | Begin from the kth item, where k is the step size |
C. | Cannot be improved |
D. | Step size should be other than sqrt(n) |
Answer» C. Cannot be improved | |
3. |
Given, arr = {1,3,5,6,7,9,14,15,17,19} key = 17 and delta = {5,3,1,0}How many key comparisons are made?(exclude the comparison used to decide the left or right sub array) |
A. | 4 |
B. | 3 |
C. | 5 |
D. | 6 |
Answer» C. 5 | |
4. |
What is the time complexity of uniform binary search? |
A. | O(nlogn) |
B. | O(logn) |
C. | O(n) |
D. | O(n2) |
Answer» C. O(n) | |
5. |
In which of the cases uniform binary search fails compared to binary search? |
A. | A table lookup is generally faster than an addition and a shift |
B. | Many searches will be performed on the same array |
C. | Many searches will be performed on several arrays of the same length |
D. | Complexity of code |
Answer» E. | |
6. |
Given delta[4] is a global array and number of elements in the sorted array is 10, what are the values in the delta array? |
A. | 4, 3, 1, 0 |
B. | 5, 3, 1, 0 |
C. | 4, 2, 1, 1 |
D. | 5, 2, 1, 1 |
Answer» C. 4, 2, 1, 1 | |
7. |
When is the uniform binary search an optimization over the usual binary search? |
A. | A table lookup is generally faster than an addition and a shift |
B. | Many searches will be performed on the same array |
C. | Many searches will be performed on several arrays of the same length |
D. | All of the mentioned |
Answer» E. | |