

MCQOPTIONS
Saved Bookmarks
This section includes 4 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. |
What is the time complexity of the above code used to search an element in an array? |
A. | O(1) |
B. | O(n) |
C. | O(n<sup>2</sup>) |
D. | O(n<sup>3</sup>) |
Answer» B. O(n) | |
2. |
Index of 3 is 0 |
A. | Index of 3 is 1 |
B. | Index of 3 is 2 |
C. | Index of 3 is 3 |
Answer» D. | |
3. |
Finds the index of all the occurrences of the number that is searched |
A. | Finds the index of the first occurrence of the number that is searched |
B. | Finds the index of the last occurrence of the number that is searched |
C. | None of the mentioned |
Answer» C. None of the mentioned | |
4. |
Which of the following techniques can be used to search an element in an unsorted array? |
A. | Iterative linear search |
B. | Recursive binary search |
C. | Iterative binary search |
D. | All of the mentioned |
Answer» B. Recursive binary search | |