Question
i) Binary search is used for searching in a sorted array.
ii) The time complexity of binary search is O(logn).
a.
True, False
b.
False, True
c.
False, False
d.
True, True
Posted under Data Structures and Algorithms
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. State True or False. i) Binary search is used for searching in a sorted array. ii) The time complexity of binary search is O(logn).
Similar Questions
Discover Related MCQs
Q. Which of the following is not the internal sort?
View solution
Q. In general, the binary search method needs no more than ……………. comparisons.
View solution
Q. The Worst case occur in linear search algorithm when
View solution
Q. The Average case occur in linear search algorithm
View solution
Q. Which of the following is not the required condition for binary search algorithm?
View solution
Q. Which of the following is not a limitation of binary search algorithm?
View solution
Q. Binary search algorithm can not be applied to
View solution
Q. If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the expected number of collisions involving a particular key x is :
View solution
Q. You have to sort a list L consisting of a sorted list followed by a few “random” elements. Which of the following sorting methods would be especially suitable for such a task?
View solution
Q. A technique for direct search is
View solution
Q. The searching technique that takes O (1) time to find a data is
View solution
Q. The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is
View solution
Q. In worst case Quick Sort has order
View solution
Q. A sort which relatively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
View solution
Q. Which of the following sorting algorithms does not have a worst case running time of O (n^2) ?
View solution
Q. The quick sort algorithm exploit _________ design technique.
View solution
Q. The total number of companions required to merge 4 sorted files containing 15, 3, 9 and 8 records into a single sorted file is
View solution
Q. The complexity of searching an element from a set of n elements using Binary search algorithm is
View solution
Q. Which of the following sorting methods would be most suitable for sorting a list which is almost sorted
View solution
Q. Quick sort is also known as
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Data Structures and Algorithms? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!