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
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
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
ISI2018PCBCS5
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.7k
points)

26
views
isi2018pcbcs
algorithms
algorithmdesign
heap
descriptive
0
votes
0
answers
2
ISI2018PCBCS1
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.7k
points)

22
views
isi2018pcbcs
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
(
421k
points)

3k
views
gate2019
numericalanswers
algorithms
algorithmdesign
+2
votes
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
(
421k
points)

366
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)

603
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
(
18.1k
points)

135
views
isi2017
algorithms
algorithmdesign
descriptive
+2
votes
0
answers
7
CMI2017B2
There are a number of tourist spots in a city and a company GoMad runs shuttle services between them. Each shuttle plies between a designated origin and destination, and has a name. Due to lack of coordination, the same name may be allotted to multiple routes. To make matters ... are carrying a GoMad pass or a GoCrazy pass, you can start at $s$ and arrive at $t$ using the sequence $σ$.
asked
Feb 5, 2018
in
Algorithms
by
Tesla!
Boss
(
18.1k
points)

84
views
cmi2017
algorithms
algorithmdesign
+8
votes
2
answers
8
ISI2015PCBCS2a
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
(
103k
points)

263
views
descriptive
isi2015pcbcs
algorithms
algorithmdesign
+11
votes
4
answers
9
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
(
103k
points)

571
views
descriptive
cmi2012
algorithms
algorithmdesign
+4
votes
1
answer
10
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
(
103k
points)

266
views
cmi2012
descriptive
algorithms
algorithmdesign
+11
votes
3
answers
11
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.8k
points)

634
views
tifr2011
algorithms
algorithmdesign
+3
votes
1
answer
12
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)

434
views
gate1994
algorithms
normal
algorithmdesign
+24
votes
7
answers
13
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
(
103k
points)

2.4k
views
gate20141
algorithms
numericalanswers
normal
algorithmdesign
+44
votes
8
answers
14
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.7k
views
gate2006
algorithms
normal
algorithmdesign
timecomplexity
+30
votes
4
answers
15
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.6k
views
gate2006
algorithms
normal
algorithmdesign
+10
votes
4
answers
16
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)

929
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
Standard Book Exercise Questions for Computer Science
Resource to Learn Graph Theory Interactively
Recruitment to the post of Scientist/Engineer 'SC' (Electronics, Mechanical and Computer Science)
Standard Videos for Calculus
Standard Videos for Linear Algebra
Follow @csegate
Recent questions tagged algorithmdesign
Recent Blog Comments
Are the answers also present ?
@Arjun sir , Is there any page or something where...
@arjun sir but u called about providing the pdfs...
But anyhow I appreciate this. The questions of...
All these PYQ blogs and standard videos blogs...
50,376
questions
55,840
answers
192,571
comments
91,400
users