The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
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 algorithms
Webpage for Algorithms
0
votes
1
answer
1
JEST 2019
Solve the recurrence relation given as: T(n)=2T(n2)+n; where T(2)=2 and T(1)=0 What is the time complexity?
asked
6 days
ago
in
Algorithms
by
vivek_mishra
(
399
points)

70
views
jest
2019
algorithms
0
votes
0
answers
2
JEST 2019 Descriptive Q4 (8 Marks)
Give an efficient algorithm for maximum size rectangle binary submatrix with all 1s . [Complexity should be O($n^c$)] (Memory based – Original question had a lot of added details)
asked
6 days
ago
in
Algorithms
by
dan31
Junior
(
657
points)

34
views
jest
2019
algorithms
0
votes
1
answer
3
JEST Sample Question 1d
T (n) = T (n/2) + 2; T (1) = 1 When n is a power of 2, the correct expression for T (n) is: (A) 2(log n + 1) (B) 2 log n (C) log n + 1 (D)2 log n + 1
asked
Feb 15
in
Algorithms
by
sripo
Active
(
1.5k
points)

56
views
gate
jest
algorithms
timecomplexity
0
votes
1
answer
4
JEST Sample Question4
A tournament is a directed graph in which there is exactly one directed edge between every pair of vertices. Let Tn be a tournament on n vertices. (a) Use induction to prove the following statement: Tn has a directed hamiltonian path (a directed ... or a simple description of the steps in the algorithm, will suffice. What is the worst case time complexity of your algorithm?
asked
Feb 15
in
Algorithms
by
sripo
Active
(
1.5k
points)

39
views
jest
gate
algorithms
discretemathematics
graphtheory
0
votes
1
answer
5
JEST Sample Question5
Describe two different data structures to represent a graph. For each such representation, specify a simple property about the graph that can be more efficiently checked in that representation than in the other representation. Indicate the worst case time required for verifying both of your properties in either representation.
asked
Feb 15
in
Algorithms
by
sripo
Active
(
1.5k
points)

17
views
jest
gate
algorithms
graphtheory
graphalgorithms
0
votes
0
answers
6
JEST Sample Question7
Consider the following program: function mu(a,b:integer) returns integer; var i,y: integer; begin P i = 0; y = 0; while (i < a) do begin Q y := y + b ; i = i + 1 end return y end Write a condition P such that the program terminates, and a condition Q which is true whenever program execution reaches the place marked Q above.
asked
Feb 15
in
Programming
by
sripo
Active
(
1.5k
points)

22
views
jest
gate
programminginc
algorithms
0
votes
0
answers
7
Gate 2019: Subsequence Sum
asked
Feb 8
in
Algorithms
by
HeartBleed
(
485
points)

89
views
algorithms
dynamicprogramming
+2
votes
2
answers
8
GATE201920
An array of $25$ distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to $2$ decimal places) is ________
asked
Feb 7
in
Algorithms
by
Arjun
Veteran
(
385k
points)

2.2k
views
gate2019
numericalanswers
algorithms
quicksort
probability
+2
votes
4
answers
9
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
(
385k
points)

2.2k
views
gate2019
numericalanswers
algorithms
divideandconquer
+2
votes
8
answers
10
GATE201926
Consider the following C function. void convert (int n ) { if (n<0) printf{ %d , n); else { convert(n/2); printf( %d , n%2); } } Which one of the following will happen when the function convert is called with any positive integer ... reverse order and terminate It will print the binary representation of $n$ but will not terminate It will not print anything and will not terminate
asked
Feb 7
in
Algorithms
by
Arjun
Veteran
(
385k
points)

3.2k
views
gate2019
algorithms
+1
vote
6
answers
11
GATE201937
There are $n$ unsorted arrays: $A_1, A_2, \dots, A_n$. Assume that $n$ is odd Each of $A_1, A_2, \dots, A_n$ contains $n$ distinct elements. There are no common elements between any two arrays. The worstcase time complexity of computing the median of the medians of $A_1, A_2, \dots , A_n$ is $O(n)$ $O(n \: \log \: n)$ $O(n^2)$ $\Omega (n^2 \log n)$
asked
Feb 7
in
Algorithms
by
Arjun
Veteran
(
385k
points)

3.1k
views
gate2019
algorithms
timecomplexity
0
votes
1
answer
12
finding two positive integers in an array
I'm facing a problem these days, the question is saying the following: " Imagine we are having an array of positive integers called (a) and a variable called (k). Among this integers, we are looking for two numbers such that the sum of ... 6,2 in this case what would be the designing of the algorithm? Thank you all for your efforts, they worth a lot!
asked
Feb 4
in
Study Resources
by
miller
(
37
points)

95
views
functions
logic
algorithms
+1
vote
1
answer
13
BFS traversal path
What will be the path from AH if BFS is used in the following graph?
asked
Feb 2
in
Algorithms
by
saptarshiDey
(
83
points)

51
views
graphalgorithms
algorithms
bfs
datastructure
0
votes
0
answers
14
Can Merge Sort Time Complexity be O(n^2) in any condition?
asked
Feb 1
in
Algorithms
by
aditykansara
(
23
points)

81
views
algorithms
timecomplexity
sorting
0
votes
1
answer
15
Made easy mock test mst
Consider a simple undirected weighted graph G(V, E) with 10 vertices and 45 edge, assume (u, v) are two vertices weight of a edge is =4lu vl then the minimum cost of the spanning tree of G_ 36
asked
Jan 30
in
Algorithms
by
Ram Swaroop
Active
(
2.3k
points)

62
views
madeeasytestseries
mst
algorithms
0
votes
1
answer
16
ME Mock 4
Consider a new sorting algorithm similar to the BubbleSort algorithm, called RumbleSort. Given an array as input, RumbleSort attempts to sort the array and produces a sorted array as output. Here's the pseudocode for RumbleSort. With regards to the above RumbleSort ... algorithm will work correctly for a given input is $\mathcal Ο(n^2)$ Which of the above statements is/are true?
asked
Jan 30
in
Algorithms
by
balchandar reddy san
Active
(
2.7k
points)

89
views
timecomplexity
algorithms
sorting
0
votes
0
answers
17
ME MOCK 2
We are given a C function, mystery() as follows. void mystery(int m, int n) { while(m<=n) { m++; n; } } Let X be the number of times the comparission inside the while loop ( i.e., m<=n ) is performed, when mystery(127,255) is called. Then the value of X is _______________
asked
Jan 30
in
DS
by
himgta
Active
(
3.6k
points)

69
views
algorithms
0
votes
0
answers
18
Made easy theory book
Consider the following array with 7 elements for insertion sort? 25, 15, 30, 9, 99, 20, 26 In how many passes, the given sequence will be sorted? (a) 4 pass (b) 5 pass (c) 6 pass (d) More than 6 pass Answer is 6 passes. Can anyone explain it step by step.
asked
Jan 26
in
Algorithms
by
Jyoti Kumari97
(
225
points)

46
views
madeeasybooklet
selfdoubt
algorithms
insertionsort
0
votes
1
answer
19
Random Doubt in f(n)=O(n^2)
Can any one please help me out in understanding how to read : f(n)=O(n^2) I am confused in : 1] f(n) is the upper bound of n^2 2]f(n)’s upper bound is n^2 Or is their any another way of reading it out…! THANK YOU
asked
Jan 25
in
Algorithms
by
Nandkishor3939
Active
(
1.2k
points)

15
views
algorithms
timecomplexity
0
votes
2
answers
20
DAA: LInked list and sorted array
Suppose that two repositories exist for storing and searching through a certain type of record. The first repository uses a linked list; on average, it requires $10$ ms to search $1024$ records, or $10240$ ms to search $1048576$ records. ... two versions require approximately equal time, on average? 1. 2048 records 2. 4096 records 3. 16384 records 4. 65536 records
asked
Jan 23
in
Algorithms
by
chauhansunil20th
Active
(
4.8k
points)

64
views
algorithms
linkedlists
sorting
0
votes
1
answer
21
A Different Kind of Question on Longest Common Subsequence
Consider two strings A = "anandarmy" and B = "algorithms". Let ‘y’ be the length of the longest common subsequence (not necessarily contiguous) between A and B and let ‘x’ be the number of such longest common subsequences between A and B. Then 2x+3y = _________.
asked
Jan 22
in
Algorithms
by
gmrishikumar
Active
(
1.7k
points)

43
views
algorithms
longestcommonsubsequence
dynamicprogramming
0
votes
0
answers
22
Dynamic programming
My answer came out to be 13: because when we will compute T(13) { as we are using Dynamic programming , it will have to compute value of T(12),T(11),…...T(2) only once(as it will store it and reuse it) so the stack size will be 1 (for T(13))+11 (for T(12),T(11),…...T(2)) = 12…...(48/4) } will any one help me out
asked
Jan 22
in
Algorithms
by
Nandkishor3939
Active
(
1.2k
points)

31
views
algorithms
dynamicprogramming
programming
0
votes
0
answers
23
Merge sort
What is the extra memory needed for merge sort: 1] In case of Iterative merge sort.(DS:Array) 2]In case of Recursive merge sort.(DS:Array) 3] In case of Iterative merge sort.(DS:Linked List) 4]In case of Recursive merge sort.(DS:Linked List)
asked
Jan 21
in
Algorithms
by
Nandkishor3939
Active
(
1.2k
points)

46
views
mergesort
algorithms
sorting
0
votes
0
answers
24
made easy test
Consider a scenario of modified quick sort, where we have given an input sorted array A[1 .. . n], all elements of array are distinct and n >=3. Pivot is the median of set of 3 elements [First element, middle element, and last element]. What will be worst case time complexity of modified quick sort? a.O($n^{2}$) b.O(nlogn) c.O($n^{2}$logn) d.O(nloglogn)
asked
Jan 21
in
Algorithms
by
newdreamz a1z0
Active
(
1.6k
points)

30
views
madeeasytestseries
algorithms
quicksort
0
votes
0
answers
25
SELF doubt
Which of the following statements is /are FALSE? I.Given a graph where all edge weights are strictly greater than 3, a shortest path between vertices s and t can be found by adding 3 to the weight of each edge and running Dijkstra's algorithm from s. ... having no incoming edges, a depthfirst search from s will always generate a DFS tree containing a longest simple path in the graph.
asked
Jan 21
in
Algorithms
by
bhanu kumar 1
Junior
(
771
points)

26
views
algorithms
0
votes
1
answer
26
Recurrence relation and Time Complexity
What is the time complexity of the following recurrence relation and step to derive the same $T(n) = T(\sqrt{n}) + log(logn)$
asked
Jan 20
in
Algorithms
by
VikramRB
(
205
points)

76
views
timecomplexity
algorithms
recurrence
recurrenceeqation
0
votes
0
answers
27
Bellman ford for disconnected graph
True of False Bellman ford algorithm correctly computes shortest path in graph with no negative edges //graph can be disconnected as well.
asked
Jan 20
in
Algorithms
by
bts1jimin
(
245
points)

14
views
bellmanford
algorithms
0
votes
1
answer
28
Self Doubt
The average no. of comparisons performed by the merge sort algorithm, in merging 2 sorted lists of length 2 is___________. Ans: $\frac{8}{3}$
asked
Jan 19
in
Algorithms
by
kumar.dilip
Active
(
5k
points)

73
views
algorithms
mergesort
0
votes
1
answer
29
ME mock1
Consider a binary tree, where for every node P – Q ≤ 2, where P represents number of nodes in left sub tree for node S and Q represents the number of nodes in right sub tree for node S for h > 0. The minimum number of nodes present in such a binary tree of height h =4 will be 6 8 9 None of these
asked
Jan 19
in
Algorithms
by
balchandar reddy san
Active
(
2.7k
points)

22
views
algorithms
Page:
1
2
3
4
5
6
...
74
next »
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
Need suggestions for what to do next after Gate ??
For GATECSE Admissions 2019
Challenge to GATE keys: Question 26, If you also want to challenge the same, as I did!
How to follow Standard Textbooks?
Gate contest link is now open
Follow @csegate
Recent questions tagged algorithms
Recent Blog Comments
Well it is quite nostalgic for me as if I have...
See in recent posts "For GATE CSE Admissions 2019"
which ppt are you referring to, can you share the...
I am not a ranker so you might not believe on my...
What is the status on appsgate website? I...
47,932
questions
52,335
answers
182,384
comments
67,817
users