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 searching
1
vote
1
answer
1
NIELIT Scientific Assistant A 2020 November: 65
Finding the location of the element with a given value is : Traversal Search Sort None of the options
gatecse
asked
in
Algorithms
Dec 9, 2020
by
gatecse
136
views
nielit-sta-2020
algorithms
searching
1
vote
3
answers
2
NIELIT 2017 DEC Scientist B - Section B: 8
Let $A$ be an array of $31$ numbers consisting of a sequence of $0$’s followed by a sequence of $1$’s. The problem is to find the smallest index $i$ such that $A[i]$ is $1$ by probing the minimum number of locations in $A$. The worst case number of probes performed by an optimal algorithm is $2$ $4$ $3$ $5$
Lakshman Patel RJIT
asked
in
Algorithms
Mar 30, 2020
by
Lakshman Patel RJIT
623
views
nielit2017dec-scientistb
algorithms
searching
array
0
votes
1
answer
3
Cormen Edition 3 Exercise 2.3 Question 6 (Page No. 39)
Observe that the while loop of the INSERTION-SORT procedure uses a linear search to scan (backward) through the sorted subarray $A[i\dots j-1]$ Can we use a binary search (see Exercise 2.3-5) instead to improve the overall worst-case running time of insertion sort to $\Theta(n\ lg\ n)$?
akash.dinkar12
asked
in
Algorithms
Jun 26, 2019
by
akash.dinkar12
547
views
algorithms
cormen
searching
descriptive
0
votes
0
answers
4
Cormen Edition 3 Exercise 2.3 Question 5 (Page No. 39)
Referring back to the searching problem (see Exercise 2.1-3), observe that if the sequence $A$ is sorted, we can check the midpoint of the sequence against $v$ and eliminate half of the sequence from further consideration. The binary ... recursive, for binary search. Argue that the worst-case running time of binary search is $\Theta (lg\ n)$.
akash.dinkar12
asked
in
Algorithms
Jun 26, 2019
by
akash.dinkar12
247
views
cormen
algorithms
searching
descriptive
0
votes
1
answer
5
Cormen Edition 3 Exercise 2.2 Question 3 (Page No. 29)
Consider the linear search again (see Exercise 2.1-3). How many elements of the input sequence need to be checked on the average, assuming that the element being searched for is equally likely to be any element in the array? ... case? What are the average-case and worst-case running times of linear search in -notation? Justify your answers.
akash.dinkar12
asked
in
Algorithms
Jun 25, 2019
by
akash.dinkar12
2.3k
views
cormen
algorithms
searching
descriptive
0
votes
0
answers
6
Cormen Edition 3 Exercise 2.1 Question 3 (Page No. 22)
Consider the searching problem: Input: A sequence of $n$ numbers $A = \langle a_1, a_2,\dots a_n \rangle$ and a value $v$ Output: An index $i$ such that $v=A[i]$ or the special value NIL if $v$ does ... $v$. Using a loop invariant, prove that your algorithm is correct. Make sure that your loop invariant fulfills the three necessary properties.
akash.dinkar12
asked
in
Algorithms
Jun 25, 2019
by
akash.dinkar12
272
views
cormen
algorithms
searching
descriptive
2
votes
1
answer
7
Vani Qs Bank Algorithms
.Given an array of distinct integers A[1, 2,…n]. Find the tightest upper bound to check the existence of any index i for which A[i]=i. Ans should be O(log n) right by doing binary search ??
Hirak
asked
in
Algorithms
May 21, 2019
by
Hirak
797
views
algorithms
array
searching
vani-booklet
1
vote
1
answer
8
Applied Course | Mock GATE | Test 1 | Question: 47
In a sorted file structure, let the cost of reading a page be $D=10$ milliseconds, the number of data pages be $B=1024$. Let the average time to process a record is $C=5$ milliseconds. Let the number of records ... the time taken to perform a search with equality selection? $10$ milliseconds $120$ milliseconds $5$ milliseconds $50$ milliseconds
Applied Course
asked
in
Algorithms
Jan 16, 2019
by
Applied Course
363
views
applied-course-2019-mock1
algorithms
searching
0
votes
1
answer
9
GATE Overflow | Mock GATE | Test 1 | Question: 32
A sequential search operation is performed on an array $A$ for the key value of $'x'$ (ignore quotes). Consider the following piece of assembly language code that uses back patching to perform the sequential search. i=0; P: if (i<A.length) goto ____; Q: ... values in the blanks provided ordered from top to bottom? R T U P R U T P P U T R P T U R
Ruturaj Mohanty
asked
in
Algorithms
Dec 27, 2018
by
Ruturaj Mohanty
415
views
go-mockgate-1
algorithms
searching
compiler-design
intermediate-code
code-optimization
2
votes
0
answers
10
Algorithm Searching
Which is faster and by how much, a linear search of only 1000 elements on a 5-GHz computer or a binary search of 1 million elements on a 1-GHz computer. Assume that the execution of each instruction on the 5-GHz computer is five times ... 1-GHz computer and that each iteration of the linear search algorithm is twice as fast as each iteration of the binary search algorithm.
Vaishnavi01
asked
in
Algorithms
Sep 23, 2018
by
Vaishnavi01
257
views
algorithms
searching
1
vote
2
answers
11
what is the expected number of comparisons made before the algorithm terminates ?
radha gogia
asked
in
Algorithms
Aug 7, 2018
by
radha gogia
506
views
algorithms
searching
normal
test-series
1
vote
1
answer
12
Ace Algorithms
Suppose A is a sorted array and some of the elements are duplicates. What is the best upper bound to find out the number of elements that are equal to a given key 'k' a) O(log n) b) O(n) c) O(nlogn) d) O(n2)
Sambhrant Maurya
asked
in
Algorithms
Aug 7, 2018
by
Sambhrant Maurya
406
views
algorithms
searching
0
votes
0
answers
13
Better Algorithm for aggregating data from LDAP Systems
This question is not related to GATE, but certainly would help you to grill your mind to come up with a better approach.. Feel free to comment if you think, this is not a right forum for this question. I have 10 ... format cannot be changed as there is dependency with other downstream systems. Is there a better approach to achieve the same ?
Arunav Khare
asked
in
Programming
May 14, 2018
by
Arunav Khare
190
views
algorithms
searching
0
votes
1
answer
14
Uttrakhand Asst. Professor Exam-19
Which of the following search method takes less memory ? Depth-first search Breadth-first search Linear search None of the above
gatecse
asked
in
Unknown Category
Mar 2, 2018
by
gatecse
783
views
uttarakhand-asst-prof-2018
data-structures
searching
50
votes
8
answers
15
GATE CSE 2017 Set 1 | Question: 48
Let $A$ be an array of $31$ numbers consisting of a sequence of $0$'s followed by a sequence of $1$'s. The problem is to find the smallest index $i$ such that $A\left [i \right ]$ is $1$ by probing the minimum number of locations in $A$. The worst case number of probes performed by an optimal algorithm is ____________.
Arjun
asked
in
Algorithms
Feb 14, 2017
by
Arjun
15.0k
views
gatecse-2017-set1
algorithms
normal
numerical-answers
searching
0
votes
0
answers
16
MadeEasy Advance Test Series: Algorithm - Searching
can someone provide me the detailed description for this answer?
S Ram
asked
in
Algorithms
Feb 1, 2017
by
S Ram
194
views
made-easy-test-series
algorithms
searching
3
votes
3
answers
17
UGC NET CSE | December 2014 | Part 3 | Question: 56
An $A^{*}$ algorithm is a heuristic search technique which Is like a depth-first search where most promising child is selected for expansion Generates all successor nodes and computes an estimate of distance (cost) from start node ... (costs) from start node to all generated nodes and chooses shortest path for further expansion. None of the above
makhdoom ghaya
asked
in
Others
Jul 30, 2016
by
makhdoom ghaya
2.3k
views
ugcnetcse-dec2014-paper3
artificial-intelligence
searching
21
votes
3
answers
18
GATE CSE 2008 | Question: 85
Consider the following C program that attempts to locate an element $x$ in an array $Y[ \ ]$ using binary search. The program is erroneous. f (int Y[10] , int x) { int i, j, k; i= 0; j = 9; do { k = (i + j) / 2; if( Y[k] < x) i = k;else j = k; } while (Y[k] ... if $(Y[k] < x) i = k$; else $j = k$; Change line 7 to: } while $((Y[k] == x) \&\& (i < j))$ ;
go_editor
asked
in
Algorithms
Apr 23, 2016
by
go_editor
4.9k
views
gatecse-2008
algorithms
searching
normal
21
votes
2
answers
19
GATE CSE 1996 | Question: 18
Consider the following program that attempts to locate an element $x$ in an array $a[ ]$ using binary search. Assume $N > 1$. The program is erroneous. Under what conditions does the program fail? var i,j,k: integer; x: integer; a: array; [1..N] of integer; begin i ... ;= j); if (a[k] = x) then writeln ('x is in the array') else writeln ('x is not in the array') end;
Kathleen
asked
in
Algorithms
Oct 10, 2014
by
Kathleen
2.5k
views
gate1996
algorithms
searching
normal
descriptive
47
votes
8
answers
20
GATE CSE 1996 | Question: 2.13, ISRO2016-28
The average number of key comparisons required for a successful search for sequential search on $n$ items is $\frac{n}{2}$ $\frac{n-1}{2}$ $\frac{n+1}{2}$ None of the above
Kathleen
asked
in
Algorithms
Oct 9, 2014
by
Kathleen
25.5k
views
gate1996
algorithms
easy
isro2016
searching
60
votes
9
answers
21
GATE CSE 2002 | Question: 2.10
Consider the following algorithm for searching for a given number $x$ in an unsorted array $A[1..n]$ having $n$ distinct values: Choose an $i$ at random from $1..n$ If $A[i] = x$, then Stop else Goto 1; Assuming that $x$ is present in $A$, what is the expected number of comparisons made by the algorithm before it terminates? $n$ $n-1$ $2n$ $\frac{n}{2}$
Kathleen
asked
in
Algorithms
Sep 16, 2014
by
Kathleen
17.6k
views
gatecse-2002
searching
normal
41
votes
5
answers
22
GATE CSE 2008 | Question: 84
Consider the following C program that attempts to locate an element $x$ in an array $Y[ \ ]$ using binary search. The program is erroneous. f (int Y[10] , int x) { int i, j, k; i= 0; j = 9; do { k = (i+ j) / 2; if( Y[k] < x) i = k;else j = k; } while (Y[k] != x ... $Y$ is $[2 \ 4 \ 6 \ 8 \ 10 \ 12 \ 14 \ 16 \ 18 \ 20]$ and $ 2 < x < 20$ and $x$ is even
Kathleen
asked
in
Algorithms
Sep 11, 2014
by
Kathleen
15.6k
views
gatecse-2008
algorithms
searching
normal
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
RECRUITMENT IN OIL AND GAS CORPORATION LIMITED
Aptitude Overflow Book
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(647)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(855)
Recent questions tagged searching
Recent Blog Comments
@abir_banerjee Thanks Abir. I'm third year...
@nolan_keats Currently I am in third year...
@abir_banerjee thank you Abir.Supposing you...
@nolan_keats just a suggestion as I also...
@abir_banerjee Hope I can do this in span of one...