Binary search is performed on a sorted array of elements. What is the maximum number of comparisons in the worst case?
GATE CSE · Algorithms
Generate diverse GATE-level questions covering divide and conquer paradigm, recursion breakdown, complexity derivation, and algorithm design strategies.
70 questions · 0 PYQs · 20 AI practice · GATE CSE 2027
Binary search is performed on a sorted array of elements. What is the maximum number of comparisons in the worst case?
Binary search can be used to find the number of occurrences of a key in a sorted array of elements (with possible duplicates). What is the time complexity of finding the count of ?
The number of comparisons required in worst case by merge sort to sort n elements is:
The lower bound of comparison-based searching in the worst case is . Which of the following correctly justifies this?
Binary search is performed on a sorted array of elements. What is the maximum number of comparisons in the worst case?
The recurrence relation T(n) = 2T(n/2) + √n evaluates to:
Which of the following is NOT a Divide and Conquer algorithm?
Binary search is used to find the position where a value should be inserted in a sorted array of elements to keep it sorted (lower_bound operation). The array is and . What is the insertion position (0-indexed) returned by lower_bound?
Consider binary search on a sorted array . How many comparisons are needed to search for the element (which is not present)?
Which of the following are TRUE about binary search and its variants?
In a binary search on a sorted array of elements, if the element is not present, how many comparisons are made in the worst case?
Consider a sequence of elements. If we use a Divide and Conquer algorithm that splits the problem into subproblems each of size , what is the total work if the combine step takes ?
Which of the following is NOT solved using Divide and Conquer?
The recurrence relation with solves to:
Binary search is applied on a sorted array of elements. What is the worst-case number of comparisons required to search for an element?
Binary search works on which of the following conditions?
In the context of the Merge Sort algorithm, what is the maximum number of comparisons needed to merge two sorted arrays of size and ?
Consider T(n) = 3T(n/2) + n. Using Master Theorem, what is the complexity?
Which of the following statements about binary search are TRUE?
Binary search is performed on a sorted array of elements. An element is found after exactly 4 comparisons. Which level of the binary search decision tree does the element reside at (root is level 1)?
Want unlimited AI-generated Divide And Conquer questions?
Sign up free and practice with adaptive difficulty — Easy, Medium, Hard. New questions every session.
Start practising for free →