Recent questions tagged binary-search

4 votes
4 answers
32
How many different binary search trees can be constructed using six distinct keys? 256 128 132 264
4 votes
1 answer
36
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 require...
7 votes
3 answers
38
Which of the following is exact recurrence relation for binary search (in terms of number of comparisons) ?1. T(n) = 2T(n/2) + 12. T(n) = 2T(n/2) + 2Please specify releva...
10 votes
3 answers
39
Suppose the first step in binary search algorithm is changed to M = (9L+R)/10, we know that the complexity of binary search is log(n). What will be the complexity of modi...
6 votes
5 answers
40
How to get space complexity of binary search ..I am getting confusion in Space complexity = ip + extra (stack) And ip = nB ( why it is nB) ????? And extra = logn B So nB+...
1 votes
1 answer
41
A binary search algorithm is implemented using recurrsionthen what is the space and time complexity?
5 votes
4 answers
43
I/p - Sorted array of n elementO/p- find any two elements a and b such that (a+b)>1000if lenear search is possible then go to Binary Search and Find time complexity ..?
11 votes
2 answers
44
0 votes
1 answer
46
6 votes
3 answers
47
I/p - array of n element in which untill some postion all are integer and afterward all are star (*) O/p- find the postion of 1st star (*)Hint - if lenear search is possi...
1 votes
1 answer
49
Derive the running time of the binary search algorithm. If I modify binary search to break the interval size into 1/3, 2/3 rather than 1/2, 1/2, then what is the worst ca...
2 votes
1 answer
50
what are the complexities of different trees like BST,AVL,HEAP,B-tree etc for insertion updation deletion for all 3 cases 1)best 2)avg 3)worst
0 votes
1 answer
52
Stack space used in binary search resursive implementation.
2 votes
2 answers
53
3 votes
4 answers
54
1 votes
1 answer
55
Given a sorted array of distinct interger A[1...N] , you want to find out whether there is an index "i" for which A[i] =i . if this problem is solved using divide and con...
1 votes
2 answers
58
What is the worst case complexity for searching for a key in a sorted array using Binary Search??
2 votes
2 answers
59
2 votes
1 answer
60
Binary search algorithm employs the strategy ofDivide and Conquer techniqueDynamic ProgrammingBranch & Bound techniqueGreedy Strategy