The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Prev
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions tagged algorithmdesign
0
votes
0
answers
1
ISI2018PCBB5
Consider a maxheap of $n$ distinct integers, $n ≥ 4$, stored in an array $\mathcal{A}[1 . . . n]$. The second minimum of $\mathcal{A}$ is the integer that is less than all integers in $\mathcal{A}$ except the minimum of $\mathcal{A}$. Find all possible array indices of $\mathcal{A}$ in which the second minimum can occur. Justify your answer.
asked
May 12
in
Algorithms
by
akash.dinkar12
Boss
(
41.1k
points)

23
views
isi2018pcbb
algorithms
algorithmdesign
heap
descriptive
0
votes
0
answers
2
ISI2018PCBB1
Consider an array of length n consisting only of positive and negative integers. Design an algorithm to rearrange the array so that all the negative integers appear before all the positive integers, using $O(n)$ time and only a constant amount of extra space.
asked
May 12
in
Algorithms
by
akash.dinkar12
Boss
(
41.1k
points)

19
views
isi2018pcbb
algorithms
algorithmdesign
descriptive
+3
votes
5
answers
3
GATE201925
Consider a sequence of $14$ elements: $A=[5, 10, 6, 3, 1, 2, 13, 4, 9, 1, 4, 12, 3, 0]$. The sequence sum $S(i,j) = \Sigma_{k=i}^j A[k]$. Determine the maximum of $S(i,j)$, where $0 \leq i \leq j <14$. (Divide and conquer approach may be used.) Answer: ___________
asked
Feb 7
in
Algorithms
by
Arjun
Veteran
(
416k
points)

2.8k
views
gate2019
numericalanswers
algorithms
algorithmdesign
+1
vote
1
answer
4
TIFR2019A5
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 the least ... within which she can always find out the number Lata has thought of? $10$ $32$ $100$ $999$ $\text{None of the above}$
asked
Dec 18, 2018
in
Algorithms
by
Arjun
Veteran
(
416k
points)

321
views
tifr2019
algorithmdesign
binarysearch
+6
votes
1
answer
5
CMI2010  6
You are given a list of positive integers along with a sequence of operations from the set $\left \{ *,+\right \}$ .You construct expressions from these two lists so that: The numbers in the expression are drawn from the first list, without repetition and ... assume that the length of the first list is more than the length of the second list. Describe an algorithm to solve this problem.
asked
Apr 30, 2018
in
Algorithms
by
Sammohan Ganguly
(
311
points)

523
views
algorithms
descriptive
cmi2010
algorithmdesign
0
votes
1
answer
6
ISI2017PCBC6
Let $A = \{a_1,a_2, \dots ,a_n\}$ be an array of $n$ distinct numbers. The array may not be sorted. The first element $a_1$ is said to be a blip if $a_1 > a_2$. Similar, the last element an is said to be a blip if $a_n > a_{n1}$. Among the ... $O(\log n)$ time algorithm for finding a blip in $A$. Justify the complexity of your algorithm.
asked
Apr 28, 2018
in
Algorithms
by
Tesla!
Boss
(
18k
points)

134
views
isi2017
algorithms
algorithmdesign
descriptive
+8
votes
2
answers
7
ISI2015CS2a
You are given two strings $S$ and $T$, each of length $\alpha$, consisting only of lower case English letters $(a,b, \dots ,z)$. Propose an $O(\alpha)$time algorithm to decide whether $S$ can be obtained by permuting the symbols of $T$ ... $YES$; but if $S \: = \: trainee$, $T\: = \:retinaa$, your algorithm should return $NO$.
asked
May 29, 2016
in
Algorithms
by
jothee
Veteran
(
98.4k
points)

240
views
descriptive
isi2015
algorithms
algorithmdesign
+10
votes
4
answers
8
CMI2012B03b
Let $A$ be an array of $n$ integers, sorted so that $A[1] \leq A[2] \leq \dots A[n]$. Suppose you are given a number $x$ and you wish to find out if there exist indices $k$ and $l$ such that $A[k]+A[l] = x$. Design an $O(n)$ algorithm for this problem.
asked
May 27, 2016
in
Algorithms
by
jothee
Veteran
(
98.4k
points)

559
views
descriptive
cmi2012
algorithms
algorithmdesign
+4
votes
1
answer
9
CMI2012B03a
Let $A$ be an array of $n$ integers, sorted, so that $A[1] \leq A[2] \leq \dots A[n]$. Suppose you are given a number $x$ and you wish to find out if there are indices $k$ and $l$ such that $A[k]+A[l] = x$. Design an $O(n \log n)$ time algorithm for this problem.
asked
May 23, 2016
in
Algorithms
by
jothee
Veteran
(
98.4k
points)

236
views
cmi2012
descriptive
algorithms
algorithmdesign
+11
votes
3
answers
10
TIFR2011B29
You are given ten rings numbered from $1$ to $10$, and three pegs labeled $A$, $B$, and $C$. Initially all the rings are on peg $A$, arranged from top to bottom in ascending order of their numbers. The goal is to move all the rings to peg $B$ in the ... be placed on top of another ring with a lower number. How many moves are required? $501$ $1023$ $2011$ $10079$ None of the above.
asked
Oct 22, 2015
in
Algorithms
by
makhdoom ghaya
Boss
(
29.5k
points)

603
views
tifr2011
algorithms
algorithmdesign
+3
votes
1
answer
11
GATE19947
An array $A$ contains $n$ integers in locations $A[0], A[1], \dots A[n1]$. It is required to shift the elements of the array cyclically to the left by $K$ places, where $1\leq K \leq n1$. An incomplete algorithm for doing this in linear time, without using another array is given below. ... A[j]:=____; j:=(j+K) mod n; if j<min then min:=j; end; A[(n+iK)mod n]:=____; i:=______; end;
asked
Oct 6, 2014
in
Algorithms
by
Kathleen
Veteran
(
52.1k
points)

409
views
gate1994
algorithms
normal
algorithmdesign
+24
votes
7
answers
12
GATE2014137
There are $5$ bags labeled $1$ to $5$. All the coins in a given bag have the same weight. Some bags have coins of weight $10$ gm, others have coins of weight $11$ gm. I pick $1, 2, 4, 8, 16$ coins respectively from bags $1$ to $5$ Their total weight comes out to $323$ gm. Then the product of the labels of the bags having $11$ gm coins is ___.
asked
Sep 28, 2014
in
Algorithms
by
jothee
Veteran
(
98.4k
points)

2.3k
views
gate20141
algorithms
numericalanswers
normal
algorithmdesign
+43
votes
8
answers
13
GATE200654
Given two arrays of numbers $a_{1},...,a_{n}$ and $b_{1},...,b_{n}$ where each number is $0$ or $1$, the fastest algorithm to find the largest span $(i, j)$ such that $ a_{i}+a_{i+1}+\dots+a_{j}=b_{i}+b_{i+1}+\dots+b_{j}$ or report that ... $\Theta (n)$ time and space Takes $O(\sqrt n)$ time only if the sum of the $2n$ elements is an even number
asked
Sep 26, 2014
in
Algorithms
by
Rucha Shelke
Active
(
3.3k
points)

5.4k
views
gate2006
algorithms
normal
algorithmdesign
timecomplexity
+29
votes
4
answers
14
GATE200617
An element in an array $X$ is called a leader if it is greater than all elements to the right of it in $X$. The best algorithm to find all leaders in an array solves it in linear time using a left to right pass of the array solves it in linear time using a right to left pass of the array solves it using divide and conquer in time $\Theta (n\log n)$ solves it in time $\Theta( n^2)$
asked
Sep 17, 2014
in
Algorithms
by
Rucha Shelke
Active
(
3.3k
points)

3.4k
views
gate2006
algorithms
normal
algorithmdesign
+10
votes
4
answers
15
GATE19928
Let $T$ be a Depth First Tree of a undirected graph $G$. An array $P$ indexed by the vertices of $G$ is given. $P[V]$ is the parent of vertex $V$, in $T$. Parent of the root is the root itself. Give a method for finding and ... proportional to the length of the cycle. Describe the algorithm in a PASCAL $(C)$  like language. Assume that the variables have been suitably declared.
asked
Sep 13, 2014
in
Algorithms
by
Kathleen
Veteran
(
52.1k
points)

872
views
gate1992
algorithms
descriptive
algorithmdesign
To see more, click for the
full list of questions
or
popular tags
.
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
ISI MTECH CS 2019 INTERVIEW EXPERIENCE
IIT HYDERABAD MTECH TA INTERVIEW EXPERIENCE
How to prepare for GATE with a fulltime job??
Interview Experience at IISc
All subject Gate notes from Standard Books!!
Follow @csegate
Recent questions tagged algorithmdesign
Recent Blog Comments
received the GO books in good conditions!! thanks
Sir please update your stocks, when it will be...
Yes. Stock is over with Indiapost.
But on Amazon the stock is there and a way too...
49,845
questions
54,764
answers
189,381
comments
80,277
users