Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged binary-search
3
votes
2
answers
31
Binary Search
Suppose we have the following sorted list: [3, 5, 6, 8, 11, 12, 14, 15, 17, 18] and array data structure is used. We are using recursive binary search algorithm to search an element 8. Which of the following group of number correctly shown the sequence of comparison used to find element 8? (Assume array index starting with 0). a) 11,5,6,8 b) 12,6,11,8
Suppose we have the following sorted list:[3, 5, 6, 8, 11, 12, 14, 15, 17, 18]and array data structure is used. We are using recursive binary search algorithm to search a...
VS
3.8k
views
VS
asked
Dec 8, 2017
Algorithms
binary-search
+
–
4
votes
4
answers
32
Number of binary search trees
How many different binary search trees can be constructed using six distinct keys? 256 128 132 264
How many different binary search trees can be constructed using six distinct keys? 256 128 132 264
Parshu gate
6.8k
views
Parshu gate
asked
Nov 27, 2017
DS
binary-tree
binary-search
binary-search-tree
+
–
4
votes
1
answer
33
Ace Test Series: Algorithms - Searching
saxena0612
1.5k
views
saxena0612
asked
Nov 23, 2017
Algorithms
binary-search
algorithms
ace-test-series
recurrence-relation
+
–
7
votes
2
answers
34
Question on sorted array and time complexity
Which of the following operations can be performed in O(log n) time or faster on a sorted array A? (n denotes the size of array) 1) Search(A, x) 2) Find-Minimum(A) 3) Delete(A, x) Choose the correct option: A.) 1 & 3 B.) 1 & 2 C.) 2 & 3 D.) All of them I chose option B but the book says option D is right. Please provide an explanation.
Which of the following operations can be performed in O(log n) time or faster on a sorted array A? (n denotes the size of array)1) Search(A, x)2) Find-Minimum(A)3) Delete...
Akash Mishra
4.6k
views
Akash Mishra
asked
Nov 22, 2017
Algorithms
algorithms
sorting
time-complexity
binary-search
+
–
3
votes
0
answers
35
Binary Search
In this given question I find all answers false because while implementing binary seach or tracing it for an example we need to follow same approach Right? if we are taking ceil for evaluation then it should be considered throughout and if we are ... should be traced.Therefore applying both operating individually I find none of the options matching. Correct Me If I am wrong here.
In this given question I find all answers false because while implementing binary seach or tracing it for an example we need to follow same approach Right? if we are taki...
saxena0612
1.1k
views
saxena0612
asked
Nov 16, 2017
Algorithms
binary-search
algorithms
+
–
4
votes
1
answer
36
Binary search on two mutually exclusive arrays.
There are two sorted list each of length $n$ ... the search the moment we find the element. So tell me whose solution is correct? Why my solution should be incorrect?
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...
Aghori
1.2k
views
Aghori
asked
Nov 5, 2017
Algorithms
binary-search
algorithms
data-structures
time-complexity
+
–
2
votes
1
answer
37
Finding Minimum
.........
.........
junaid ahmad
311
views
junaid ahmad
asked
Oct 29, 2017
Algorithms
algorithms
binary-search
time-complexity
numerical-answers
test-series
+
–
7
votes
3
answers
38
Self-doubt
Which of the following is exact recurrence relation for binary search (in terms of number of comparisons) ? 1. T(n) = 2T(n/2) + 1 2. T(n) = 2T(n/2) + 2 Please specify relevant reasons.
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...
just_bhavana
1.3k
views
just_bhavana
asked
Aug 22, 2017
Algorithms
algorithms
binary-search
+
–
10
votes
3
answers
39
Modified Binary Search
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 modified search? a) log(n) b) n c) n$\log 9/10(n)$ d) 2nlog(n)
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...
Chandramani Adil
1.5k
views
Chandramani Adil
asked
Aug 16, 2017
DS
time-complexity
binary-search
+
–
6
votes
5
answers
40
Binary search
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+ log n B = O(n) ...
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+...
air1ankit
2.0k
views
air1ankit
asked
Aug 9, 2017
Algorithms
algorithms
binary-search
+
–
1
votes
1
answer
41
algorithm
A binary search algorithm is implemented using recurrsion then what is the space and time complexity?
A binary search algorithm is implemented using recurrsionthen what is the space and time complexity?
A_i_$_h
411
views
A_i_$_h
asked
Jul 24, 2017
Algorithms
binary-search
recursion
space-complexity
time-complexity
+
–
2
votes
1
answer
42
Gate algorithm
Harikesh Kumar
502
views
Harikesh Kumar
asked
Jul 10, 2017
Algorithms
sorting
binary-search
time-complexity
test-series
+
–
5
votes
4
answers
43
Binary Search
I/p - Sorted array of n element O/p- find any two elements a and b such that (a+b)>1000 if lenear search is possible then go to Binary Search and Find time complexity ..?
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 ..?
Raushank2
2.7k
views
Raushank2
asked
Jun 28, 2017
Algorithms
algorithms
binary-search
time-complexity
+
–
11
votes
2
answers
44
Self doubt in Binary search Algo
The average successful search time taken by binary search on a sorted array of $10$ items? $2.6$ $2.7$ $2.8$ $2.9$ Answer is $2.9$ My doubt:- But when I am using $log_2n$ for $n = 10$ it is not equal to $2.9$, and $log_210 = 3.3219$ ?
The average successful search time taken by binary search on a sorted array of $10$ items?$2.6$$2.7$$2.8$$2.9$Answer is $2.9$My doubt:- But when I am using $log_2n$ for $...
Shubhanshu
11.2k
views
Shubhanshu
asked
Jun 5, 2017
Algorithms
algorithms
binary-search
time-complexity
+
–
0
votes
1
answer
45
Where to study these topics listed in this post
Hello fellow GO members. What's the proper order and from where to start and reading about - Search operations like Linear Search and Binary Search etc and Operations on Array! Please someone tell me what subjects these topics from and what books or video lectures should I follow? Thanks!
Hello fellow GO members. What's the proper order and from where to start and reading about -Search operations like Linear Search and Binary Search etc and Operations on A...
iarnav
310
views
iarnav
asked
Apr 29, 2017
Algorithms
algorithms
binary-search
reference-book
+
–
0
votes
1
answer
46
Binary Stream
We have a run of 0's followed by the run of 1's and we have to find the point where first 1 will be present. We only know the start of the sequence but we have no idea about the end. what should the best case complexity of this problem? Describe your approach.
We have a run of 0's followed by the run of 1's and we have to find the point where first 1 will be present. We only know the start of the sequence but we have no idea ab...
Mandeep Singh
582
views
Mandeep Singh
asked
Apr 14, 2017
Algorithms
binary-search
+
–
6
votes
3
answers
47
binary search
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 possible the go to BS Find time complexity ..?
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...
air1ankit
1.6k
views
air1ankit
asked
Mar 9, 2017
Algorithms
algorithms
binary-search
binary-search-tree
+
–
1
votes
1
answer
48
Time complexity to compute the sum of k smallest element in the binary search tree??
Time complexity to compute the sum of k smallest element in the binary search tree?? can we do it like this- Start doing the inorder traversal of the binary search tree, it will give the elements in increasing order. ... which we have got. Its time complexity will be O(h+k). Am i right?? plzz plzz explain someone
Time complexity to compute the sum of k smallest element in the binary search tree??can we do it like this-Start doing the inorder traversal of the binary search tree, it...
sushmita
2.0k
views
sushmita
asked
Feb 2, 2017
Programming in C
binary-search
binary-search-tree
+
–
1
votes
1
answer
49
IITd Phd -sample Q
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 case running time?
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...
Aboveallplayer
897
views
Aboveallplayer
asked
Dec 1, 2016
Algorithms
binary-search
time-complexity
+
–
2
votes
1
answer
50
complexity of different trees
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
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
Sanjay Sharma
1.4k
views
Sanjay Sharma
asked
Nov 23, 2016
Algorithms
data-structures
tree
binary-search
time-complexity
descriptive
+
–
4
votes
2
answers
51
binary search
Consider an array ‘A’ with 2m elements. The elements in odd position are sorted in non-increasing order that is A[1] >= A[3] >= A[5]......A[2m-1] The elements in even position are sorted in non-decreasing order, that is A[2]<= A[4] <= A[6].....A[2m]. Which of the following method is recommended for finding if a given number is in array?
Consider an array ‘A’ with 2m elements. The elements in odd position are sorted in non-increasing order that is A >= A[3] >= A[5]......A[2m-1] The elements in even p...
vaishali jhalani
1.8k
views
vaishali jhalani
asked
Nov 10, 2016
Algorithms
binary-search
algorithms
+
–
0
votes
1
answer
52
binary search
Stack space used in binary search resursive implementation.
Stack space used in binary search resursive implementation.
vaishali jhalani
893
views
vaishali jhalani
asked
Nov 10, 2016
Algorithms
binary-search
algorithms
+
–
2
votes
2
answers
53
Comparisons in a Binary Search
How many comparisons are needed for a binary search in a set of 64 elements?
How many comparisons are needed for a binary search in a set of 64 elements?
Rohan Mundhey
5.5k
views
Rohan Mundhey
asked
Nov 9, 2016
Algorithms
algorithms
binary-search
numerical-answers
+
–
3
votes
4
answers
54
ARRAYS
Consider an array containing ‘n’ elements. The elements present in an array are in arithmetic progression, but one element is missing in that order. What is the time complexity to find the position of the missing element using divide and conquer?
Consider an array containing ‘n’ elements. The elements present in an array are in arithmetic progression, but one element is missing in that order. What is the time ...
Rohan Mundhey
2.8k
views
Rohan Mundhey
asked
Nov 9, 2016
Algorithms
algorithms
binary-search
time-complexity
+
–
1
votes
1
answer
55
#Algorithm
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 conquer method,then find time complexity.
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...
papesh
1.2k
views
papesh
asked
Nov 4, 2016
Algorithms
binary-search
algorithms
+
–
6
votes
2
answers
56
Gatebook exam
Consider the following exponential search algorithm(ES). The array of n elements have to be searched is divided in to logn parts. The ith part is from index to. to search an element search all the parts one by one from left to right using binary search algorithm. What is the worst case complexity of above searching algorithm?
Consider the following exponential search algorithm(ES). The array of n elements have to be searched is divided in to logn parts. The ith part is from index to. to searc...
Sayan Das 1
1.4k
views
Sayan Das 1
asked
Aug 27, 2016
Programming in C
binary-search
+
–
3
votes
3
answers
57
Binary Search Tree
Suppose we do not have a parent pointer in the nodes of a search tree, only left-child and right-child. Which of the following operations can be computed in time $O(\log n)$ for a balanced search tree? 1- find, insert, delete, but not min, max, pred, succ 2- ... pred, succ 3- find, insert, delete, pred, succ but not min, max 4- All of find, insert, delete, min, max, pred, succ
Suppose we do not have a parent pointer in the nodes of a search tree, only left-child and right-child. Which of the following operations can be computed in time $O(\log ...
dd
2.4k
views
dd
asked
Aug 23, 2016
Algorithms
binary-search
algorithms
data-structures
binary-search-tree
binary-tree
+
–
1
votes
2
answers
58
Binary Search
What is the worst case complexity for searching for a key in a sorted array using Binary Search??
What is the worst case complexity for searching for a key in a sorted array using Binary Search??
Jithin Jayan
1.1k
views
Jithin Jayan
asked
Jul 24, 2016
Algorithms
algorithms
binary-search
descriptive
+
–
2
votes
2
answers
59
Binary search
If the binary search algorithm determines that the scanned argument is in upper half of the array,which of the following statement will set the appropriate variable to the appropriate value. A) startsub= middlesub-1; B) startsub=middlesub+1; C)stopsub=middlesub-1; D)stopsub=middlesub+1;
If the binary search algorithm determines that the scanned argument is in upper half of the array,which of the following statement will set the appropriate variable to th...
vivekpinto07
3.0k
views
vivekpinto07
asked
Jun 24, 2016
DS
binary-search
+
–
2
votes
1
answer
60
Binary search algorithm employs the strategy of
Binary search algorithm employs the strategy of Divide and Conquer technique Dynamic Programming Branch & Bound technique Greedy Strategy
Binary search algorithm employs the strategy ofDivide and Conquer techniqueDynamic ProgrammingBranch & Bound techniqueGreedy Strategy
shivani2010
1.1k
views
shivani2010
asked
Jun 12, 2016
Algorithms
algorithms
binary-search
+
–
Page:
« prev
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register