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
0
answers
1
Practicing Algorithms and Data Structures for Interview
I have got a good GATE rank in 2019 and most probably I will get into IITB TA. I am thinking of working on algorithms and data structures before I join. I have gone through a lot of content regarding ... someone provide some pointers or any resources that help me improve my skills for competitive coding or interview preparation in general?
asked
2 days
ago
in
Others
by
gmrishikumar
Active
(
1.8k
points)

57
views
datastructure
interview
algorithms
competitivecoding
0
votes
1
answer
2
Made Easy Test Series : Algorithm
for(k=1;k<(n+1);k++) { for(m=1;m<(n+1);m+=k){ x=x+1; } } What is the T.C. of the following code? Is it $n^{2}$ or $n\log n$??
asked
2 days
ago
in
Algorithms
by
srestha
Veteran
(
111k
points)

59
views
madeeasytestseries
algorithms
0
votes
0
answers
3
self doubt *0/1 knapsack problem*
In 0/1 knapsack problem ,suppose if maximum weight is given as W and we are asked to find out max profit then * IS IT NECESSARY THAT THE TOTAL WEIGHT SHOULD BE EXACTLY EQUAL TO W OR IT CAN BE LESS THAN W AS WELL????
asked
5 days
ago
in
Algorithms
by
karan25gupta
(
123
points)

18
views
algorithms
dynamicprogramming
knapsack
0
votes
2
answers
4
made easy test series:algorithms,sorting
why not merge sort?we don’t swap in merge sort,we just create auxillary arrays and merge them by changing elements in the original array.should we consider that as a swap?
asked
6 days
ago
in
Algorithms
by
hitesh159
(
131
points)

58
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
5
AVL Tree Balancing
here what to do first as FIZZA and IMRAN both are unbalanced than either to do RR rotation from FIZZAIMRANNAVEEN or RL rotation from IMRANNAVEENLOVELY
asked
Apr 13
in
DS
by
kd.....
Junior
(
883
points)

23
views
avltree
datastructure
tree
bst
algorithms
0
votes
0
answers
6
Algorithm Time ComplexitySelf Doubt
What is the best case and worst case of the algorithm? And when will best case and worst case will happen?? int main() { for(i=1 ; i<=n ; i++) { if(n%i == 0) { for(j=1 ; j<=n ; j++) { printf("Hello"); } } } }
asked
Apr 10
in
Algorithms
by
sumitr
(
243
points)

100
views
algorithms
timecomplexity
selfdoubt
0
votes
1
answer
7
Vani Question Bank
Find the total number of comparisons if merge sort is used. Explain with proper steps. 2, 5, 8, 4, 1, 7, 6, 3 Total no of comparison.
asked
Apr 7
in
Algorithms
by
Hirak
(
397
points)

45
views
algorithms
mergesort
0
votes
0
answers
8
Cormen Edition 3 Exercise 22.1 Question 8 (Page No. 593)
Suppose that instead of a linked list, each array entry $adj[u]$ is a hash table containing the vertices $v$ for which $(u,v) \in E$. If all edge lookups are equally likely, what is the expected ... alternate data structure for each edge list that solves these problems. Does your alternative have disadvantages compared to the hash table ?
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

21
views
cormen
algorithms
graphalgorithms
descriptive
0
votes
0
answers
9
Cormen Edition 3 Exercise 22.1 Question 6 (Page No. 593)
Most graph algorithms that take an adjacencymatrix representation as input require time $\Omega(V^2)$,but there are some exceptions. Show how to determine whether a directed graph $G$ contains a universal link $$ a vertex with indegree $V1$ and outdegree $0$ in time $O(V)$ , given an adjacency matrix for $G$.
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

10
views
cormen
algorithms
graphalgorithms
descriptive
0
votes
0
answers
10
Cormen Edition 3 Exercise 22.1 Question 5 (Page No. 593)
The square of a directed graph $G=(V,E)$ is the graph $G^2=(V,E^2)$ such that $(u,v) \in E^2$ if and only $G$ contains a path with at most two edges between $u$ and $v$ .Describe efficient algorithms for computing $G^2$ and $G$ for both the adjacency list and adjacencymatrix representations of G. Analyze the running times of your algorithms.
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

9
views
cormen
algorithms
graphalgorithms
descriptive
0
votes
1
answer
11
Cormen Edition 3 Exercise 22.1 Question 4 (Page No. 593)
Given an adjacencylist representation of a multi graph $G=(V,E)$, describe an $O(V+E)$ time algorithm to compute the adjacencylist representation of the equivalent undirected graph $G'=(V,E')$ , where $E'$ is ... the edges in $E$ with all multiple edges between two vertices replaced by a single edge and with all selfloops removed.
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

16
views
cormen
algorithms
graphalgorithms
descriptive
0
votes
0
answers
12
Cormen Edition 3 Exercise 22.1 Question 3 (Page No. 592)
The transpose of a directed graph $G=(V,E)$ is the graph $G^T=(V,E^T)$, where $E^T=\{(v,u) \in V * V :(u,v) \in E \ \}$ .Thus ,$G^T$ is $G$ with all its edges reversed . Describe ... algorithms for computing $G^T$ from $G$,for both the adjacency list and adjacency matrix representations of $G$. Analyze the running times of your algorithms.
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

10
views
cormen
algorithms
graphalgorithms
descriptive
0
votes
1
answer
13
Cormen Edition 3 Exercise 22.1 Question 2 (Page No. 592)
Give an adjacencylist representation for a complete binary tree on $7$ vertices. Give an equivalent adjacencymatrix representation. Assume that vertices are numbered from $1\ to\ 7$ as in a binary heap.
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

12
views
cormen
algorithms
graphalgorithms
descriptive
0
votes
1
answer
14
Cormen Edition 3 Exercise 22.1 Question 1 (Page No. 592)
Given an adjacencylist representation of a directed graph, how long does it take to compute the outdegree of every vertex ? How long does it take to compute the indegrees ?
asked
Apr 7
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

13
views
cormen
algorithms
graphalgorithms
descriptive
+1
vote
0
answers
15
Cormen Edition 3 Exercise 6.1 Question 7 (Page No. 154)
Show that, with the array representation for storing an $n$element heap, the leaves are the nodes indexed by $\lfloor n/2\rfloor +1$,$\lfloor n/2\rfloor +2,…,n$
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

15
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
16
Cormen Edition 3 Exercise 6.1 Question 6 (Page No. 154)
Is the array with values $23,17,14; 6,13,10,1,5,7,12$ a maxheap ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

18
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
17
Cormen Edition 3 Exercise 6.1 Question 5 (Page No. 154)
Is an array that is in sorted order a minheap ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

18
views
cormen
algorithms
heap
0
votes
0
answers
18
Cormen Edition 3 Exercise 6.1 Question 4 (Page No. 154)
Where in a maxheap might the smallest element reside, assuming that all elements are distinct ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

21
views
cormen
algorithms
sorting
heap
descriptive
0
votes
0
answers
19
Cormen Edition 3 Exercise 6.1 Question 3 (Page No. 153)
Show that in any subtree of a maxheap, the root of the subtree contains the largest value occurring anywhere in that subtree.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

9
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
20
Cormen Edition 3 Exercise 6.1 Question 2 (Page No. 153)
Show that an $n$element heap has height $\lfloor lg\ n \rfloor$.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

18
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
21
Cormen Edition 3 Exercise 6.1 Question 1 (Page No. 153)
What are the minimum and maximum numbers of elements in a heap of height $h$?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

9
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
22
Cormen Edition 3 Exercise 4.6 Question 3 (Page No. 106)
Show that case 3 of the master theorem is overstated, in the sense that the regularity condition $af(n/b)\geq cf(n)$ for some constant $c<1$ implies that there exists a constant $\epsilon >0$ such that $f(n)=\Omega(n^{log_ba+\epsilon})$.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

12
views
cormen
algorithms
recurrenceeqation
mastertheorem
descriptive
difficult
0
votes
0
answers
23
Cormen Edition 3 Exercise 4.6 Question 2 (Page No. 106)
Show that if $f(n)=\Theta(n^{log_ba}\lg^kn )$, where $k\geq0$ then the master recurrence has solution $T(n) =\Theta(n^{log_ba} \lg^{k+1}n)$.For simplicity, confine your analysis to exact powers of $b$.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

9
views
cormen
algorithms
recurrenceeqation
mastertheorem
descriptive
difficult
0
votes
0
answers
24
Allen Carrer Institute: Algorithm
Using best first search for a shortest path from A to Z, the order in which nodes are considered best for the path is (Note : that these are node orders not full paths.) (1) A < C < F < D < E (2) A < C < E < B (3) A < C < F < E < B (4) A < C < D < F
asked
Apr 5
in
Algorithms
by
srestha
Veteran
(
111k
points)

21
views
algorithms
0
votes
0
answers
25
Allen Career Institute: Algorithm
Identify the algorithm which works on the principle that locally optimal solutions are globally optimal. $\left ( A \right )$ Divide and Conquer $\left ( B \right )$ Greedy $\left ( C \right )$ Dynamic Programming $\left ( D \right )$ All of the above
asked
Apr 5
in
Algorithms
by
srestha
Veteran
(
111k
points)

56
views
algorithms
0
votes
0
answers
26
Cormen Edition 3 Exercise 4.5 Question 5 (Page No. 97)
Consider the regularity condition $af(n/b) \leq cf(n)$ for some constant $c<1$,which is part of case 3 of the master theorem. Give an example of constants $a\geq 1$ and $b>1$ and a function $f(n)$ that satisfies all the conditions in case 3 of the master theorem except the regularity condition.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

10
views
cormen
algorithms
recurrenceeqation
mastertheorem
descriptive
difficult
0
votes
0
answers
27
Cormen Edition 3 Exercise 4.5 Question 4 (Page No. 97)
Can the master method be applied to the recurrence $T(n)=4T(n/2)+n^2\ lg\ n$ ?Why or why not? Give an asymptotic upper bound for this recurrence.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

14
views
cormen
algorithms
recurrenceeqation
mastertheorem
descriptive
0
votes
0
answers
28
Cormen Edition 3 Exercise 4.5 Question 3 (Page No. 97)
Use the master method to show that the solution to the binarysearch recurrence $T(n)=T(n/2) + \Theta(1)$ is $T(n)=\Theta(lg\ n)$.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

10
views
cormen
algorithms
recurrenceeqation
mastertheorem
descriptive
0
votes
0
answers
29
Cormen Edition 3 Exercise 4.5 Question 2 (Page No. 97)
Professor Caesar wishes to develop a matrixmultiplication algorithm that is asymptotically faster than Strassen's algorithm. His algorithm will use the divide and conquer method, dividing each matrix into pieces of size ... value of $a$ for which Professor Caesar's algorithm would be asymptotically faster than Strassen's algorithm?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

10
views
cormen
algorithms
recurrenceeqation
mastertheorem
descriptive
0
votes
0
answers
30
Cormen Edition 3 Exercise 4.5 Question 1 (Page No. 96)
Use the master method to give tight asymptotic bounds for the following recurrences. $T(n)=2T(n/4) + 1$ $T(n)=2T(n/4) +\sqrt{n}$ $T(n)=2T(n/4) +n$ $T(n)=2T(n/4) +n^2$
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

7
views
cormen
algorithms
recurrenceeqation
mastertheorem
Page:
1
2
3
4
5
6
...
80
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
IIT BHUBANESWAR MTECH WRITTEN TEST/INTERVIEW
GATE score validity queries.
How to prepare for IISC Interdisciplinary Mathematical Sciences Interview
GO Hardcopy for GATE 2020
How to prepare for BARC interview
Follow @csegate
Recent questions tagged algorithms
Recent Blog Comments
10000 to <2000 is really kind of achievement , my...
THey removed it this year... I did not check it,...
even though i am not going for iiit , can you...
I don't think IIITD requires any codechef...
Will apply for IIITB. IIIT D requires a codechef...
50,115
questions
53,224
answers
184,676
comments
70,473
users