>
Exams
>
Data Science and Artificial Intelligence
>
Binary Operations
>
let f n denote the maximum number of comparisons m
Question:
Let F(n) denote the maximum number of comparisons made while searching for an entry in a sorted array of size n using binary search.
Which ONE of the following options is TRUE ?
GATE DA - 2024
GATE DA
Updated On:
Jan 30, 2026
F(n) = F(⌊n/2⌋) + 1
F(n) = F(⌊n/2⌋) + F(⌈n/2⌉)
F(n) = F(⌊n/2⌋)
F(n) = F(n - 1) + 1
Hide Solution
Verified By Collegedunia
The Correct Option is
A
Solution and Explanation
The correct option is (A) : F(n) = F(⌊n/2⌋) + 1.
Download Solution in PDF
Was this answer helpful?
0
0
Top Questions on Binary Operations
If \( a b = a + b + ab \), then \( 3 4 - 2 3 \) is equal to
Bihar Board XII - 2025
Computer Science
Binary Operations
View Solution
Let H, I, L, and N represent height, number of internal nodes, number of leaf nodes, and the total number of nodes respectively in a rooted binary tree.
Which of the following statements is/are always TRUE ?
GATE DA - 2024
Data Science and Artificial Intelligence
Binary Operations
View Solution
Consider a state space where the start state is number 1. The successor function for the state numbered n returns two states numbered n+1 and n+2. Assume that the states in the unexpanded state list are expanded in the ascending order of numbers and the previously expanded states are not added to the unexpanded state list.
Which ONE of the following statements about breadth-first search (BFS) and depth-first search (DFS) is true, when reaching the goal state number 6 ?
GATE DA - 2024
Data Science and Artificial Intelligence
Binary Operations
View Solution
The fundamental operations in a double-ended queue D are :
insertFirst (e) - Insert a new element e at the beginning of D.
insertLast (e) - Insert a new element e at the end of D.
removeFirst () - Remove and return the first element of D.
removeLast () - Remove and return the last element of D.
In an empty double-ended queue, the following operations are performed :
insertFirst (10)
insertLast (32)
a ← removeFirst()
insertLast (28)
insertLast (17)
a ←removeFirst()
a ← removeLast ()
The value of a is _______.
GATE DA - 2024
Data Science and Artificial Intelligence
Binary Operations
View Solution
What is the 2's complement of 1010?
AP PGECET - 2024
Computer Science & Information Technology
Binary Operations
View Solution
View More Questions
Questions Asked in GATE DA exam
Which of the following statements is/are correct?
GATE DA - 2025
Linear Algebra
View Solution
Choose the most appropriate word to complete the analogy:
Courage : Bravery :: Yearning :
GATE DA - 2025
Analogies
View Solution
When does the worst case of binary search occur?
GATE DA - 2025
Algorithm
View Solution
Suppose that insertion sort is applied to the array \([1,2,3,5,7,9,11,x,15,13]\) and it takes exactly 2 swaps to sort the array. Select all possible values of \( x \).
GATE DA - 2025
Algorithm
View Solution
Given the lists:
\[ A = [1,2,3], \quad B = [4,5,6] \]
Which of the following statements will result in
\[ A = [1,2,3,4,5,6]? \]
GATE DA - 2025
Programming in Python
View Solution
View More Questions