Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged binary-search
10
votes
3
answers
61
ISRO2007-59
The time taken by binary search algorithm to search a key in a sorted array of $n$ elements is $O\: (\log_2 \: n)$ $O \: (n)$ $O \: (n \: \log_2 \: n)$ $O \: (n^2)$
The time taken by binary search algorithm to search a key in a sorted array of $n$ elements is$O\: (\log_2 \: n)$$O \: (n)$$O \: (n \: \log_2 \: n)$$O \: (n^2)$
go_editor
10.7k
views
go_editor
asked
Jun 10, 2016
Algorithms
isro2007
algorithms
binary-search
time-complexity
+
–
2
votes
3
answers
62
Linked list
Why linked list not suitable for binary search?
Why linked list not suitable for binary search?
Anjali Raghu
813
views
Anjali Raghu
asked
Apr 4, 2016
DS
binary-search
+
–
2
votes
2
answers
63
#doubt on heaps and binary search
Consider the process of inserting an element into a max heap, where the max heap is represented by an array.Suppose we perform a binary search on the path from the new leaf to the root to find the position for newly inserted element, the ... logn) as upon applying binary search we wud compare O(logn) elements(neighbours and its own root only) plz clr my confusion
Consider the process of inserting an element into a max heap, where the max heap is represented by an array.Suppose we perform a binary search on the path from the new le...
ashandeep
838
views
ashandeep
asked
Dec 16, 2015
Algorithms
algorithms
data-structures
binary-search
+
–
3
votes
2
answers
64
Binary Search - Average Number of Comparisons.
Let you are given an array of nine elements in increasing order. If you want to implement binary search on the given array of element then the number of comparisons per successful search on an average will be: Average is 2.78, should I answer this question with or without rounding off 2.78, as number of comparisons is an integral value?
Let you are given an array of nine elements in increasing order. If you want to implement binary search on the given array of element then the number of comparisons per s...
अनुराग पाण्डेय
2.3k
views
अनुराग पाण्डेय
asked
Dec 5, 2015
Algorithms
binary-search
algorithms
numerical-answers
allen-test-series
+
–
22
votes
3
answers
65
TIFR CSE 2012 | Part B | Question: 11
Consider the following three version of the binary search program. Assume that the elements of type $T$ can be compared with each other; also assume that the array is sorted. i, j, k : integer; a : array [1....N] of T; x : T; Program 1 : ... $1$ and $2$ are correct. Both Program $2$ and $3$ are correct All the three programs are wrong
Consider the following three version of the binary search program. Assume that the elements of type $T$ can be compared with each other; also assume that the array is sor...
makhdoom ghaya
2.5k
views
makhdoom ghaya
asked
Nov 1, 2015
Algorithms
tifr2012
algorithms
binary-search
+
–
26
votes
1
answer
66
TIFR CSE 2010 | Part B | Question: 29
Suppose you are given an array $A$ with $2n$ numbers. The numbers in odd positions are sorted in ascending order, that is, $A[1] \leq A[3] \leq \ldots \leq A[2n - 1]$. The numbers in even positions are sorted in ... on the entire array. Perform separate binary searches on the odd positions and the even positions. Search sequentially from the end of the array.
Suppose you are given an array $A$ with $2n$ numbers.The numbers in odd positions are sorted in ascending order, that is, $A \leq A[3] \leq \ldots \leq A[2n - 1]$.The nu...
makhdoom ghaya
4.4k
views
makhdoom ghaya
asked
Oct 6, 2015
Algorithms
tifr2010
algorithms
binary-search
+
–
5
votes
3
answers
67
Average number of comparisons in a binary search on a sorted array of 10 consecutive int. starting from 1?
radha gogia
29.7k
views
radha gogia
asked
Sep 15, 2015
Algorithms
binary-search
numerical-answers
+
–
14
votes
4
answers
68
ISRO2014-28
Suppose there are $11$ items in sorted order in an array. How many searches are required on the average, if binary search is employed and all searches are successful in finding the item? $3.00$ $3.46$ $2.81$ $3.33$
Suppose there are $11$ items in sorted order in an array. How many searches are required on the average, if binary search is employed and all searches are successful in f...
ajit
12.9k
views
ajit
asked
Sep 5, 2015
Algorithms
algorithms
binary-search
isro2014
+
–
7
votes
2
answers
69
When is searching $O(\log n)$ in an array?
Consider the problem of searching an element $x$ in an array $\text{arr}$ of size $n$. When can the problem can be solved in $O(\log n)$ time? Array is sorted Array is sorted and rotated by $k$. $k$ is given to you and $k \leq n$. Array is sorted and ... (C) 1, 2 and 3 only (D) 1, 2, 3 and 4 I am clear with 1 and 2 option but not getting about option 3.
Consider the problem of searching an element $x$ in an array $\text{arr}$ of size $n$. When can the problem can be solved in $O(\log n)$ time?Array is sortedArray is sort...
radha gogia
7.1k
views
radha gogia
asked
Jul 30, 2015
Algorithms
algorithms
binary-search
+
–
0
votes
1
answer
70
Hi.i need a correct explanation on binary search..how it will be log n.
Miny
399
views
Miny
asked
Jul 24, 2015
Algorithms
algorithms
binary-search
+
–
Page:
« prev
1
2
3
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register