>
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
Show 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 GATE DA Data Science and Artificial Intelligence Questions
Consider performing depth-first search (DFS) on an undirected and unweighted graph G starting at vertex s. For any vertex u in G, d[u] is the length of the shortest path from s to u. Let (u, v) be an edge in G such that d[u] < d[v]. If the edge (u, v) is explored first in the direction from u to v during the above DFS, then (u, v) becomes a _____ edge.
GATE DA - 2024
Data Science and Artificial Intelligence
Database Concepts
View Solution
Three fair coins are tossed independently. T is the event that two or more tosses result in heads. S is the event that two or more tosses result in tails. What is the probability of the event T ∩ S?
GATE DA - 2024
Data Science and Artificial Intelligence
Probability
View Solution
Consider the matrix
\(M=\begin{bmatrix} 2 & -1 \\ 3 & 1 \end{bmatrix}\)
.
Which ONE of the following statements is TRUE ?
GATE DA - 2024
Data Science and Artificial Intelligence
Matrix
View Solution
For any twice differentiable function ƒ: R → R, if at some x* ∈ R, f'(x*) = 0 and f'(x*) > 0, then the function f necessarily has a ______ at x = x*.
Note : R denotes the set of real numbers.
GATE DA - 2024
Data Science and Artificial Intelligence
Differential Equations
View Solution
Match the items in Column 1 with the items in Column 2 in the following table :
Column 1
Column 2
(p)
First In First Out
(i)
Stacks
(q)
Lookup Operation
(ii)
Queues
(r)
Last In First Out
(iii)
Hash Tables
GATE DA - 2024
Data Science and Artificial Intelligence
Hashing
View Solution
View More Questions
Top GATE DA Binary Operations Questions
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
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
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
Top GATE DA Questions
Consider performing depth-first search (DFS) on an undirected and unweighted graph G starting at vertex s. For any vertex u in G, d[u] is the length of the shortest path from s to u. Let (u, v) be an edge in G such that d[u] < d[v]. If the edge (u, v) is explored first in the direction from u to v during the above DFS, then (u, v) becomes a _____ edge.
GATE DA - 2024
Database Concepts
View Solution
Three fair coins are tossed independently. T is the event that two or more tosses result in heads. S is the event that two or more tosses result in tails. What is the probability of the event T ∩ S?
GATE DA - 2024
Probability
View Solution
Consider the matrix
\(M=\begin{bmatrix} 2 & -1 \\ 3 & 1 \end{bmatrix}\)
.
Which ONE of the following statements is TRUE ?
GATE DA - 2024
Matrix
View Solution
For any twice differentiable function ƒ: R → R, if at some x* ∈ R, f'(x*) = 0 and f'(x*) > 0, then the function f necessarily has a ______ at x = x*.
Note : R denotes the set of real numbers.
GATE DA - 2024
Differential Equations
View Solution
Match the items in Column 1 with the items in Column 2 in the following table :
Column 1
Column 2
(p)
First In First Out
(i)
Stacks
(q)
Lookup Operation
(ii)
Queues
(r)
Last In First Out
(iii)
Hash Tables
GATE DA - 2024
Hashing
View Solution
View More Questions