Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged binary-search
0
votes
1
answer
1
GATE DS&AI 2024 | Question: 30
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? $F(n)=F(\lfloor n / 2\rfloor)+1$ $F(n)=F(\lfloor n / 2\rfloor)+F(\lceil n / 2\rceil)$ ... $F(n)=F(\lfloor n / 2\rfloor)$ $F(n)=F(n-1)+1$
Arjun
asked
in
Algorithms
Feb 17
by
Arjun
747
views
gate-ds-ai-2024
algorithms
binary-search
4
votes
2
answers
2
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 18
Bob writes down a number between 1 and 1,000. Mary must identify that number by asking "yes/no" questions of Bob. Mary knows that Bob always tells the truth. If Mary uses an optimal strategy then she will determine that answer at the end of exactly how many questions on the worst case? 999 500 32 10
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
391
views
goclasses2024-mockgate-14
algorithms
binary-search
1-mark
1
vote
0
answers
3
Memory Based GATE DA 2024 | Question: 19
Consider the function \(f(n)\), which represents the maximum number of comparisons in binary search on a sorted array of size \(n\). Which of the following recursive relationships correctly defines \(f(n)\)? \(f(n) = f\left(\lfloor \frac{n}{2} \rfloor\right) ... \rfloor\right)\) \(f(n) = f\left(\lfloor \frac{n}{2} \rfloor\right) + 1\) None of the above
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
143
views
gate2024-da-memory-based
goclasses
algorithms
binary-search
recurrence-relation
0
votes
2
answers
4
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). How many comparisons are needed in the worst case scenario to determine that the key is not in the array?
dhruba
asked
in
Algorithms
Jun 6, 2023
by
dhruba
1.1k
views
algorithms
binary-search
sorting
8
votes
3
answers
5
GO Classes Test Series 2023 | Algorithms | Test 1 | Question: 9
Given an unsorted array of $n$ distinct elements, you want to find this set of $\log n$ elements: those at positions $1,2,4,8,16, \ldots, n/2$ if array were sorted. In other words, find the largest element, the second largest element, the ... the subarray) $\Theta(\log n)$ $\Theta(n)$ $\Theta(n \log n)$ $\Theta\left(n^{2}\right)$
GO Classes
asked
in
Algorithms
Jun 13, 2022
by
GO Classes
701
views
goclasses2024-algo-1-weekly-quiz
goclasses
algorithms
searching
binary-search
2-marks
14
votes
4
answers
6
GATE CSE 2021 Set 2 | Question: 8
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(n^2)$ $\Theta(n)$
Arjun
asked
in
Algorithms
Feb 18, 2021
by
Arjun
11.7k
views
gatecse-2021-set2
algorithms
binary-search
time-complexity
1-mark
3
votes
1
answer
7
NIELIT 2016 MAR Scientist C - Section C: 52
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 the newly inserted element, the number of $comparisons$ ... $\Theta(n\log _{2} \log_2 n)$ $\Theta (n)$ $\Theta(n\log _{2}n)$
Lakshman Bhaiya
asked
in
DS
Apr 2, 2020
by
Lakshman Bhaiya
1.9k
views
nielit2016mar-scientistc
data-structures
binary-search
time-complexity
binary-heap
1
vote
1
answer
8
Made Easy Test Series
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)$. Then a+10b is equal to ___?
Somoshree Datta 5
asked
in
Algorithms
Dec 31, 2018
by
Somoshree Datta 5
2.4k
views
binary-search
algorithms
made-easy-test-series
numerical-answers
10
votes
6
answers
9
TIFR CSE 2019 | Part A | Question: 5
Asha and Lata play a game in which Lata first thinks of a natural number between $1$ and $1000$. Asha must find out that number by asking Lata questions, but Lata can only reply by saying Yes or no . Assume that Lata always tells the truth. What is ... she can always find out the number Lata has thought of? $10$ $32$ $100$ $999$ $\text{None of the above}$
Arjun
asked
in
Algorithms
Dec 18, 2018
by
Arjun
4.2k
views
tifr2019
algorithm-design
binary-search
1
vote
4
answers
10
Binary Search
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 using binary search and find its time complexity?
Abhishek Kumar 38
asked
in
Algorithms
Dec 15, 2018
by
Abhishek Kumar 38
2.0k
views
data-structures
binary-search
2
votes
1
answer
11
GATEBOOK_DSA4_2
In which of the cases shown below, Binary search can not always be applied for searching (A) Hierarchical data record (B) Internet Domain name conversion (C) Searching a telephone number in directory (D) An array of integers Answer is given to be (D). I thought it must be (B). Please help. I understand (D) is okay when the array is not sorted.But what about other options?
Ayush Upadhyaya
asked
in
Programming in C
Nov 15, 2018
by
Ayush Upadhyaya
1.0k
views
algorithms
binary-search
3
votes
0
answers
12
GATEBOOK-DSA4_8
Consider a sorted array A of n integer elements, A[0]...A[n − 1]. A search operation is to be performed on this array using .Binary search algorithm. If the element being searched is in fact the last element of the array, what is the difference between the index of element ... This is my answer.But it matches none of the options. Where I went wrong?
Ayush Upadhyaya
asked
in
Programming in C
Nov 15, 2018
by
Ayush Upadhyaya
913
views
data-structures
binary-search
algorithms
0
votes
1
answer
13
Algorithim
The average number of comparisons made by binary search for an unsuccessful search in array A
Sonali1996
asked
in
Algorithms
Sep 22, 2018
by
Sonali1996
1.2k
views
binary-search
0
votes
2
answers
14
Test Series
ben10
asked
in
Algorithms
Sep 9, 2018
by
ben10
817
views
algorithms
binary-search
recurrence-relation
ace-test-series
0
votes
1
answer
15
SELF DOUBT
https://gateoverflow.in/18752/tifr2010-b-29 IN THIS QUESTION WHY WE CANT NOT APPLY SINGLE BINARY SEARCH ON ENTIRE ARRAY ??? BECAUSE LET WE HAVE ARRAY 1 14 3 12 5 10 7 8 9 6 11 4 13 2 SUPPOSE WE NEED TO FIND 4 MID =7 AT MID THERE IS ODD NUMBER SO ... EVEN NUMBER ARE ARRANGED IN DESCENDING ORDER SO 4 WILL BE ON RIGHT OF 7 SO SIMILARLY WE CAN DO LIKE THAT.....IOS THIS APPROACH CORRECT??
eyeamgj
asked
in
Algorithms
Sep 1, 2018
by
eyeamgj
307
views
binary-search
algorithms
2
votes
4
answers
16
Binary Search
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$ ?
aditi19
asked
in
Algorithms
Aug 20, 2018
by
aditi19
2.5k
views
binary-search
0
votes
1
answer
17
Binary search
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)
Sabir Khan
asked
in
Algorithms
Aug 8, 2018
by
Sabir Khan
1.1k
views
algorithms
sorting
binary-search
time-complexity
3
votes
1
answer
18
Ace Algorithms
Leading element in an array of n elements is the element which occurs more than n/2 times in the array. a) What is the time complexity to find whether a leading element exists or not in a sorted array of n elements? b)What is the time complexity to find ... between 0 to n? c)What is the time complexity to find whether leading element exists or not in an unsorted array of n elements?
Sambhrant Maurya
asked
in
Algorithms
Aug 7, 2018
by
Sambhrant Maurya
1.9k
views
algorithms
divide-and-conquer
binary-search
0
votes
1
answer
19
Made Easy Algorithms
How to calculate the time complexity for finding repeated elements in an array of n elements using linear search and binary search?
Sambhrant Maurya
asked
in
Algorithms
Aug 6, 2018
by
Sambhrant Maurya
709
views
algorithms
time-complexity
binary-search
4
votes
7
answers
20
Searching
Q) Consider a sorted array of n numbers. What would be the time complexity of the best known algorithm to find a pair a and b such that |a-b| = k , k being a positive integer. a) O(logn) b) O(n) c)O(nlogn) d)O(n^2) Which of the option is Correct And Why?
pradeepchaudhary
asked
in
Algorithms
Jul 9, 2018
by
pradeepchaudhary
12.3k
views
algorithms
sorting
time-complexity
binary-search
0
votes
1
answer
21
Binary search
Find the average number of comparisons in a binary search on a sorted array of 10 consecutive integers starting from 1. 1) 2.6 2)2.7 3)2.8 4)2.9
shweta sah
asked
in
Algorithms
Jun 22, 2018
by
shweta sah
803
views
binary-search
sorting
1
vote
1
answer
22
Drdo 2008
Binary search can be carried out on a set of ordered data items stored in a (A) Array (B) Stack (C) Queue (D) List
Shankar Jha
asked
in
Algorithms
Jun 15, 2018
by
Shankar Jha
1.3k
views
binary-search
3
votes
1
answer
23
Binary Search Question!
The average successful search time taken by binary search on a sorted array of 5 CONSECUTIVE integers starting with 1? My Answer is - 2.2 Kindly tell me is it correct or not? NOTE: I have edited the question and changes are shown in highlighted text.
iarnav
asked
in
Algorithms
Mar 13, 2018
by
iarnav
1.9k
views
algorithms
binary-search
3
votes
2
answers
24
Algorithms :- Binary search vs ternary search
Why to prefer binary search over ternary search?Can someone give recreance relation for ternary search,so that i can compare both
rahul sharma 5
asked
in
Algorithms
Mar 8, 2018
by
rahul sharma 5
2.3k
views
binary-search
data-structures
algorithms
3
votes
0
answers
25
Interesting question on SQL
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in ... If Binary Search is used to locate a tuple in a relation using primary key, then what is the range of n?
Balaji Jegan
asked
in
Databases
Jan 31, 2018
by
Balaji Jegan
822
views
databases
sql
query
binary-search
1
vote
1
answer
26
binary search space complexity
Aditya Bahuguna
asked
in
Algorithms
Jan 7, 2018
by
Aditya Bahuguna
2.4k
views
binary-search
recursion
space-complexity
test-series
Page:
1
2
3
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(24)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(682)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.6k
users
Recent questions tagged binary-search
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation