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

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
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
merge sort
Why do we say Merge sort makes good use of locality of reference? and if I have $1 \hspace{0.1cm} billion$ elements and my memory can only store $1 \hspace{0.1cm} million$ elements at a time. How would I use merge sort to sort this?
asked
1 day
ago
in
Algorithms
by
Kiran Karwa
Active
(
1.1k
points)

37
views
mergesort
algorithms
0
votes
1
answer
2
#Algorithms Gate 2005 Question Self Doubt.
asked
4 days
ago
in
Algorithms
by
iarnav
Loyal
(
7k
points)

46
views
algorithms
graphalgorithms
0
votes
1
answer
3
Dijkstra Time Complexity using Binary Heap
asked
5 days
ago
in
Algorithms
by
iarnav
Loyal
(
7k
points)

29
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
1
answer
4
Finding Kth Smallest Element
Which one of the following is the recurrence equation for the worst case time complexity of finding Kth smallest element in an array of size n' using partition function? Assume c' is constant. A. T(n) = 2T(n/2) + c . n B. T(n) = 2T(n  1) + c C. (n ... ) + c . n D. T(n) = T(n/2) + c . n Explanation Please and please tell me the different ways we can solve this problem
asked
May 20
in
Algorithms
by
Na462
Active
(
2.5k
points)

62
views
algorithms
0
votes
0
answers
5
Heap DataStructure
A min heap having $1024$ distinct elements with keys ranging from $0$ to $1023$ is stored in array of $1024$ indices. The maximum difference between $(n/2)^{th}$ element present at maximum level and minimum level is ________. [Assume root is present at $level1$] ? Please Tell me the Approach
asked
May 20
in
Algorithms
by
Na462
Active
(
2.5k
points)

28
views
algorithms
binaryheap
0
votes
0
answers
6
Gate 2003 GraphAlgorithms Question Doubt.
asked
May 18
in
Algorithms
by
iarnav
Loyal
(
7k
points)

51
views
usergate2003
usermod
algorithms
graphalgorithms
0
votes
2
answers
7
#Algorithm Bellman Ford uses which algorithm design technique
asked
May 17
in
Algorithms
by
iarnav
Loyal
(
7k
points)

42
views
algorithms
bellmanford
shortestpath
graphalgorithms
selfdoubt
0
votes
1
answer
8
Finding Min and Max keys
The minimum and maximum number of keys in the internal nodes of Br with order 4 is: (a) 1, 3 (b) 2, 4 (c) 1, 4 (d) 2, 3
asked
May 16
in
Programming
by
Shumile
(
51
points)

27
views
algorithms
0
votes
0
answers
9
Better Algorithm for aggregating data from LDAP Systems
asked
May 14
in
Programming
by
Arunav Khare
Active
(
4.8k
points)

8
views
algorithms
searching
0
votes
0
answers
10
#Algorithms #DFS How to find if a directed graph G is strongly connected using DFS in one pass?
asked
May 13
in
Algorithms
by
iarnav
Loyal
(
7k
points)

21
views
graphtheory
algorithms
dfs
graphalgorithms
0
votes
2
answers
11
recurrence
asked
May 11
in
Algorithms
by
Sanjay Sharma
Boss
(
47.8k
points)

42
views
algorithms
recurrence
0
votes
1
answer
12
Doubt
Consider a stack is used to evaluate fully parenthesized arithmetic expression from left to right. Each opperand is placed on the stack and operators operate on top two elements of the stack. The minimum size of stack required to evaluate given expression is ________.
asked
May 10
in
Programming
by
Na462
Active
(
2.5k
points)

16
views
algorithms
0
votes
2
answers
13
Doubt
Consider A be a 2dimensional array declared as follows: A[15] [15] of integers. Assume each integer take 1B. The array stored in row major order and first element of array is stored at location 1000, then the address of element a[10] [6] is ________ B.
asked
May 10
in
Programming
by
Na462
Active
(
2.5k
points)

31
views
algorithms
0
votes
0
answers
14
ISI PCB C4 2017
A file F holds the nonzero elements of two large n n matrices, A and B. The matrix entries are stored as triplets (i,j,value), where value is the (i,j)th element of a matrix. The file first stores the elements of A and then those of B. ... , give reasons. If yes, provide a solution. Clearly explain the data structure and how you are going to store, retrieve, and add the elements.
asked
May 9
in
DS
by
tathatj
(
67
points)

36
views
datastructure
algorithms
userisi2017
usermod
+1
vote
1
answer
15
Time complexity
show how to sort n number in the range [0,n^21] in O(n)time?
asked
May 8
in
Algorithms
by
once_2019
(
153
points)

51
views
timecomplexity
algorithms
0
votes
1
answer
16
DFS Traversal
If DFS algorithm applied starting from vertex A' which uses stack data structure then the height of stack is needed in worst case for DFS traversal is ________? Soln. Its a simple piece of cake we just need to find that path which leads to maximum nodes ... 0 and when to start counting with 1 because such type of ambiguous question always let my question go wrong and its painful :(
asked
May 6
in
Algorithms
by
Na462
Active
(
2.5k
points)

47
views
dfs
algorithms
graphalgorithms
+1
vote
1
answer
17
Sorting
Which of the following sorting techniques have minimum number of comparision in best case? 1. Insertion Sort 2. Selection Sort 3. Merge Sort 4. Heap Sort 5.Quick Sort The answer is insertion sort but my doubt is in insertion sort algo. inside the for loop the while ... in best case.Wont it have O(n^2) Comparisons.Becasue comparisons will be done in all the cases weather its sorted or not.
asked
May 6
in
Algorithms
by
Na462
Active
(
2.5k
points)

70
views
sorting
algorithms
0
votes
1
answer
18
Doubt
Consider f (n), g(n) and h(n) be function defined as follows: Which of the following represents correct asymptotic solution for f (n) + [g(n) × h(n)]? A . Omega(n^3) B. O(n^4) C. Theta(n^4) D. O(n^3) What should be the correct way of solving such questions ?
asked
May 6
in
Algorithms
by
Na462
Active
(
2.5k
points)

32
views
algorithms
0
votes
2
answers
19
BITS HD
To sort the following numbers which algorithm will suit the best (i) 1 to 100 integers (ii) 0 to 1000000 integers a)bucket sort for both b) (i)radix sort (ii)quick sort c) (i)quick sort (ii)merge sort d) (i) merge sort (ii)quick sort
asked
May 5
in
Algorithms
by
Sayan Bose
Active
(
2.2k
points)

130
views
bits
algorithms
+1
vote
0
answers
20
Question
Which of the following represents the number of additions performed by above code? A 8000 B 4000 C 4020 D 28420 Solution: Well i got the Answer but not exact answer : Ttoal number of times loop executes = 20 * 20 * 20 = 8000 The inner condition will execute always and ... = 100*10 = 1000 (I guess here i left some Cases) So total = 17000 But sill its far away from actual answer which is D
asked
May 4
in
Programming
by
Na462
Active
(
2.5k
points)

31
views
algorithms
0
votes
0
answers
21
Doubt
Any AVL tree of height h+1 contains strictly more nodes than any AVL tree of height h. ? Its a false statement right ? what is the correct statement then ,because if in any tree Height is inversely proportional to number of nodes. Minimum height means maximum number of ... is the correct statement is : Any AVL tree of height h+1 contains strictly lesser nodes than any AVL tree of height h. ?
asked
May 4
in
Programming
by
Na462
Active
(
2.5k
points)

30
views
algorithms
0
votes
0
answers
22
Doubt
In DFS traversal every vertex of the graph is visited exactly once.? Is it correct ? According to me its True because in standard algorithm we maintain a visited datastructure to keep track of which vertex is visited and we after then skip those vertex if found again hence one vertex will never get visited again isn't it?
asked
May 3
in
Programming
by
Na462
Active
(
2.5k
points)

42
views
algorithms
0
votes
0
answers
23
General Doubt
Suppose i delete the root element from the heap then i will apply the heapify() procedure on root,and suppose if i delete a random element form heap which will take O(n) time in total then the procedure is: 1. Locate the element. 2.Swap with the ... Maxheapify(A[i]) } Am i right? And following this strategy we will find the minimum number of swaps or comparison required isnt it?
asked
May 3
in
Programming
by
Na462
Active
(
2.5k
points)

23
views
general
algorithms
+2
votes
0
answers
24
Algorithm
You have an array A with n JPEG images some of which are identical. You can check if two objects are equal but you cannot compare them in any other wayi.e. you can check A[i] == A[j] and A[i] != A[j], but comparisons such as A[i] < A[j] ... of its elements are equal to each other. Use divide and conquer to come up with an O(n logn ) algorithm to determine if A has a majority element.
asked
May 2
in
Algorithms
by
Kushagra Chatterjee
Loyal
(
6.3k
points)

64
views
algorithms
timecomplexity
divideandconquer
0
votes
1
answer
25
time complexity
$f(n)=2n^2+ n log n$ $g(n)= \dfrac{n}{logn} + log^2n$ then $f(n)\times g(n)$ is: $n^2logn$ $\dfrac{n^3}{logn}$ $n^3log^2n$ $n^2log^2n$
asked
Apr 30
in
Algorithms
by
sumit_kumar
(
279
points)

53
views
timecomplexity
algorithms
+1
vote
1
answer
26
CMI2010  6
You are given a list of positive integers along with a sequence of operations from the set {∗,+}.You construct expressions from these two lists so that: The numbers in the expression are drawn from the first list, without repetition and without altering their ... 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
in
Algorithms
by
Sammohan Ganguly
(
287
points)

53
views
algorithms
descriptive
cmi2010
0
votes
1
answer
27
Minimum Spanning Tree
1) Kruskal Algorithm 2) Prims Algorithm 3) Dijkstra Algorithm 4) Bellman Ford Algorithm 5) Floyd Warshall Algorithm Among these which one works for only i) Positive edge weight ii) Negative edge weight iii) Negative weight cycle
asked
Apr 30
in
Algorithms
by
srestha
Veteran
(
84.3k
points)

92
views
minimumspanningtrees
algorithms
graphalgorithms
mst
0
votes
3
answers
28
#Algorithms #MST Doubt in MST Questions.
asked
Apr 29
in
Algorithms
by
iarnav
Loyal
(
7k
points)

66
views
algorithms
mst
graphalgorithms
0
votes
1
answer
29
SELF_DOUBT(MST)
What important point we keep in mind while finding the #(number) of spanning tree ?? from the given graph
asked
Apr 29
in
Algorithms
by
air1ankit
Active
(
3.2k
points)

33
views
algorithms
mst
graphconnectivity
0
votes
1
answer
30
Spanning trees
Suppose that a graph G has a minimum spanning tree already computed. How quickly can we update the minimum spanning tree if we add a new vertex and incident edges to G?
asked
Apr 29
in
Algorithms
by
Durgesh Singh
Junior
(
877
points)

34
views
algorithms
graphtheory
minimumspanningtrees
Page:
1
2
3
4
5
6
...
59
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
ISRO Interview Experience
IISC CSA shortlist to final select conversion
career advice
IIT Madras MS written test and interview
Interview experience at IIITSricity
Follow @csegate
Gatecse
Recent questions tagged algorithms
Recent Blog Comments
Every night before sleeping I read it . ...
Awesome Vidhi.. Hope soon the mail of admission ...
Congrats Niharika :) :)
Congratulations and All the best for life at ISRO ...
By June end.
35,535
questions
42,875
answers
121,904
comments
42,216
users