Recent questions tagged binary-search

0 votes
2 answers
4
14 votes
4 answers
6
What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size $n$?$\Theta ( \sqrt{n})$$\Theta (\log _2(n))$$\Theta...
1 votes
1 answer
8
Given a sorted array of distinct integers A[1,2,3,..,n], the tightest upper bound to check the existence of any index i for which A[i]= i is equal to O($n^{a}log^{b}n)$. ...
1 votes
4 answers
10
There are two sorted list each of length n. An element to be searched in the both the lists. The lists are mutually exclusive. The maximum number of comparisons required ...
0 votes
1 answer
13
The average number of comparisons made by binary search for an unsuccessful search in array A
0 votes
2 answers
14
2 votes
4 answers
16
for binary search in an array of n elements the average number of searches is $\left \lfloor \log_{2}n \right \rfloor$ or $\left \lceil \log_{2}n \right \rceil$ ?
0 votes
1 answer
17
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is(A) (n)(B) (logn)(C) (log*n)(D) (1)
0 votes
1 answer
19
How to calculate the time complexity for finding repeated elements in an array of n elements using linear search and binary search?
4 votes
7 answers
20
0 votes
1 answer
21
Find the average number of comparisons in a binary search on a sorted array of 10 consecutive integers starting from 1.1) 2.62)2.73)2.84)2.9
1 votes
1 answer
22
Binary search can be carried out on a set of ordered data items stored in a(A) Array (B) Stack (C) Queue (D) List
3 votes
1 answer
23
The average successful search time taken by binary search on a sorted array of 5 CONSECUTIVE integers starting with 1?My Answer is - 2.2Kindly tell me is it correct or no...
3 votes
2 answers
24
Why to prefer binary search over ternary search?Can someone give recreance relation for ternary search,so that i can compare both