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
Recent questions tagged algorithms
Webpage for Algorithms
+3
votes
4
answers
1
GATE2020CS2
For parameters $a$ and $b$, both of which are $\omega(1)$, $T(n) = T(n^{1/a})+1$, and $T(b)=1$. Then $T(n)$ is $\Theta (\log_a \log _b n)$ $\Theta (\log_{ab} n$) $\Theta (\log_{b} \log_{a} \: n$) $\Theta (\log_{2} \log_{2} n$)
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

1.8k
views
gate2020cs
algorithms
+1
vote
3
answers
2
GATE2020CS6
What is the worst case time complexity of inserting $n^{2}$ elements into an AVLtree with $n$ elements initially? $\Theta (n^{4})$ $\Theta (n^{2})$ $\Theta (n^{2}\log n)$ $\Theta (n^{3})$
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

1k
views
gate2020cs
algorithms
+2
votes
2
answers
3
GATE2020CS23
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Assume that the table size is $23$. Then the address returned by probe $1$ in the probe sequence (assume that the probe sequence begins at probe $0$) for key value $k=90$ is_____________.
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

1.3k
views
gate2020cs
numericalanswers
algorithms
hashing
+2
votes
3
answers
4
GATE2020CS31
Let $G = (V, G)$ be a weighted undirected graph and let $T$ be a Minimum Spanning Tree (MST) of $G$ maintained using adjacency lists. Suppose a new weighed edge $(u, v) \in V \times V$ is added to $G$. The worst case time complexity of determining if $T$ is still an MST of the ... $\Theta (\mid E \mid \mid V \mid) \\$ $\Theta(E \mid \log \mid V \mid) \\$ $\Theta( \mid V \mid)$
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

1.5k
views
gate2020cs
algorithms
+6
votes
3
answers
5
GATE2020CS40
Let $G = (V,E)$ be a directed, weighted graph with weight function $w: E \rightarrow \mathbb{R}$. For some function $f: V \rightarrow \mathbb{R}$, for each edge$(u,v)\in E$, define ${w}'(u,v)$ as $w(u,v)+f(u)f(v)$. Which one of the options completes ... from $s$ to $u$ in the graph obtained by adding a new vertex $s$ to $G$ and edges of zero weight from $s$ to every vertex of $G$
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

1.8k
views
gate2020cs
algorithms
+3
votes
3
answers
6
GATE2020CS47
Consider the array representation of a binary minheap containing $1023$ elements. The minimum number of comparisons required to find the maximum in the heap is ___________.
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

982
views
gate2020cs
numericalanswers
algorithms
0
votes
4
answers
7
GATE2020CS49
Consider a graph $G = (V,E)$, where $V = \{v_1,v_2, \dots ,v_{100}\}$, $E = \{(v_i,v_j) \mid 1\leq i < j \leq 100\}$, and weight of the edge $(v_i,v_j)$ is $\mid i – j \mid$. The weight of minimum spanning tree of $G$ is _________
asked
Feb 12
in
Algorithms
by
Arjun
Veteran
(
435k
points)

679
views
gate2020cs
numericalanswers
algorithms
+3
votes
3
answers
8
TIFR2020B10
Among the following asymptotic expressions, which of these functions grows the slowest (as a function of $n$) asymptotically? $2^{\log n}$ $n^{10}$ $(\sqrt{\log n})^{\log ^{2} n}$ $(\log n)^{\sqrt{\log n}}$ $2^{2^{\sqrt{\log\log n}}}$
asked
Feb 11
in
Algorithms
by
Lakshman Patel RJIT
Veteran
(
61.3k
points)

154
views
tifr2020
algorithms
asymptoticnotations
timecomplexity
+1
vote
2
answers
9
ISRO202079
Consider product of three matrices $M_1,M_2$ and $M_3$ having $w$ rows and $x$ columns,$x$ rows and $y$ columns, and $y$ rows and $z$ columns. Under what condition will it take less time to compute the product as $(M_1M_2)M_3$ than to compute $M_1(M_2M_3)$ ? Always takes the same time $(1/x +1/z)<(1/w+1/y)$ $x>y$ $(w+x)>(y+z)$
asked
Jan 13
in
Algorithms
by
Satbir
Boss
(
25.4k
points)

215
views
isro2020
algorithms
matrixchainordering
normal
+4
votes
1
answer
10
ISRO202036
What is the complexity of the following code? sum=0; for(i=1;i<=n;i*=2) for(j=1;j<=n;j++) sum++; Which of the following is not a valid string ? $O(n^2)$ $O(n\log\ n)$ $O(n)$ $O(n\log\ n\log\ n)$
asked
Jan 13
in
Algorithms
by
Satbir
Boss
(
25.4k
points)

408
views
isro2020
algorithms
timecomplexity
normal
+2
votes
1
answer
11
ISRO202034
Huffman tree is constructed for the following data :$\{A,B,C,D,E\}$ with frequency $\{0.17,0.11,0.24,0.33\ \text{and} \ 0.15 \}$ respectively. $100\ 00\ 01101$ is decoded as $BACE$ $CADE$ $BAD$ $CADD$
asked
Jan 13
in
Algorithms
by
Satbir
Boss
(
25.4k
points)

255
views
isro2020
algorithms
huffmancode
normal
+1
vote
3
answers
12
ISRO202033
If an array $A$ contains the items $10,4,7,23,67,12$ and $5$ in that order, what will be the resultant array $A$ after third pass of insertion sort ? $67,12,10,5,4,7,23$ $4,7,10,23,67,12,5$ $4,5,7,67,10,12,23$ $10,7,4,67,23,12,5$
asked
Jan 13
in
Algorithms
by
Satbir
Boss
(
25.4k
points)

239
views
isro2020
algorithms
sorting
normal
+1
vote
2
answers
13
ISRO202021
The master theorem assumes the subproblems are unequal sizes can be used if the subproblems are of equal size cannot be used for divide and conquer algorithms cannot be used for asymptotic complexity analysis
asked
Jan 13
in
Algorithms
by
Satbir
Boss
(
25.4k
points)

192
views
isro2020
algorithms
mastertheorem
easy
+1
vote
2
answers
14
ISRO202065
Of the following sort algorithms, which has execution time that is least dependant on initial ordering of the input? Insertion sort Quick sort Merge sort Selection sort
asked
Jan 13
in
Algorithms
by
Satbir
Boss
(
25.4k
points)

194
views
isro2020
algorithms
sorting
normal
+1
vote
1
answer
15
Cormen Edition 3 Exercise 12.1 Question 5 (Page No. 289)
Argue that since sorting $n$ elements takes $\Omega (n\ lgn)$ time in the worst case in the comparison model, any comparisonbased algorithm for constructing a $BST$ from an arbitrary list of n elements takes $\Omega (n\ lgn)$ time in the worst case.
asked
Nov 20, 2019
in
Algorithms
by
Kushagra गुप्ता
Loyal
(
5.9k
points)

216
views
cormen
algorithms
descriptive
binarysearchtree
binarytree
trees
0
votes
2
answers
16
Understanding Nphard
I am having difficulty in understanding np and nphard topic in algorithms. If someone can provide some good source to learn about it in easy manner it would be a real help. Thank you!
asked
Sep 22, 2019
in
Algorithms
by
luc_Bloodstone
(
99
points)

124
views
pnpnpcnph
algorithms
+1
vote
1
answer
17
CMI2019B6
Let $A$ be an $n\times n $ matrix of integers such that each row and each column is arranged in ascending order. We want to check whether a number $k$ appears in $A.$ If $k$ is present, we should report its position  that is, the row $i$ and ... $A.$ Justify the complexity of your algorithm. For both algorithms, describe a worstcase input where $k$ is present in $A.$
asked
Sep 13, 2019
in
Algorithms
by
gatecse
Boss
(
17.7k
points)

60
views
cmi2019
algorithms
algorithmdesign
descriptive
+1
vote
0
answers
18
CMI2019B7
A college professor gives several quizzes during the semester, with negative marking. He has become bored of the usual "Best $M$ out of $N$ quizzes" formula to award marks for internal assessment. Instead, each student will be evaluated ... , the score the professor needs to award each student. Describe the space and time complexity of your dynamic programming algorithm.
asked
Sep 13, 2019
in
Algorithms
by
gatecse
Boss
(
17.7k
points)

94
views
cmi2019
algorithms
dynamicprogramming
descriptive
nongate
0
votes
2
answers
19
QUICK SORT SELF DOUBT
In quick sort for sorting of n Numbers, the 75th greatest Element is selected as pivot using $O(n^2)$ time complexity algorithm than what is the worst case time complexity of quick sort. O($n^2$) O($n^3$) O(nlogn) O(n)
asked
Sep 2, 2019
in
Algorithms
by
ajaysoni1924
Boss
(
11.1k
points)

364
views
algorithms
divideandconquer
quicksort
0
votes
1
answer
20
IIIT BLR TEST 1 : ALGORITHMS 2
A 3 way (ternary) min heap is a 3 way ( ternary  each node as atmost three children nodes, left, mid, right ) complete tree with min heap property ( value of the parent is less than the value of the children ) satisfied at every node ... c) In Heapsort, binary heap is preferred over ternary heap. State if this statement is true or false, you must justify your answer.
asked
Aug 27, 2019
in
Algorithms
by
Shaik Masthan
Veteran
(
67.9k
points)

126
views
iiit_blr
test_1
algorithms
heap
0
votes
1
answer
21
IIIT BLR TEST 1 : ALGORITHMS 1
Solve the following recursions ( in terms of Θ ). T(0) = T(1) = Θ(1) in all of the following. $T(n) = n + \frac{1}{n}\sum_{i=0}^{i=n1}T(i)$ $T(n) = n + \frac{2}{n}\sum_{i=0}^{i=n1}T(i)$ $T(n) = n + \frac{4}{n}\sum_{i=0}^{i=n/2}T(i)$ $T(n) = n + \frac{40}{n}\sum_{i=0}^{i=n/5}T(i)$
asked
Aug 27, 2019
in
Algorithms
by
Shaik Masthan
Veteran
(
67.9k
points)

174
views
iiit_blr
test_1
algorithms
timecomplexity
0
votes
1
answer
22
Cormen Edition 3 Exercise 10.1 Question 5 (Page No. 236)
Whereas a stack allows insertion and deletion of elements at only one end, and a queue allows insertion at one end and deletion at the other end, a deque (double ended queue) allows insertion and deletion at both ends. Write ... time procedures to insert elements into and delete elements from both ends of a deque implemented by an array.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

66
views
cormen
algorithms
datastructures
queues
descriptive
0
votes
1
answer
23
Cormen Edition 3 Exercise 9.1 Question 2 (Page No. 215)
Prove the lower bound of $\lceil 3n/2\rceil – 2$ comparisons in the worst case to find both the maximum and minimum of $n$ numbers. (Hint: Consider how many numbers are potentially either the maximum or minimum and investigate how a comparison affects these counts.)
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

33
views
cormen
algorithms
descriptive
0
votes
1
answer
24
Cormen Edition 3 Exercise 9.1 Question 1 (Page No. 215)
Show that the second smallest of $n$ elements can be found with $n+\lceil lg\ n \rceil 2$ comparisons in the worst case. (Hint: Also find the smallest element.)
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

38
views
cormen
algorithms
descriptive
0
votes
0
answers
25
Cormen Edition 3 Exercise 8.4 Question 5 (Page No. 204)
A probability distribution function $P(x)$ for a random variable $X$ is defined by $P(x) =Pr\{X\leq x\}$.Suppose that we draw a list of $n$ random variables $X_1,X_2,…,X_n$ from a continuous probability distribution function $P$ that is computable in $O(1)$ time. Give an algorithm that sorts these numbers in linear averagecase time.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

94
views
cormen
algorithms
sorting
bucketsort
descriptive
difficult
0
votes
0
answers
26
Cormen Edition 3 Exercise 8.4 Question 4 (Page No. 204)
We are given $n$ points in the unit circle, $P_i=(x_i,y_i)$, such that $0<x_i^2+y_i^2<1$ for $i=1,2, .,n$.Suppose that the points are uniformly distributed; that is, the probability of finding a point in ... the origin. (Hint: Design the bucket sizes in BUCKETSORT to reflect the uniform distribution of the points in the unit circle.)
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

45
views
cormen
algorithms
sorting
bucketsort
descriptive
difficult
0
votes
1
answer
27
Cormen Edition 3 Exercise 8.4 Question 3 (Page No. 204)
Let $X$ be a random variable that is equal to the number of heads in two flips of a fair coin. What is $E[X^2]$? What is $E^2[X]$?
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

54
views
cormen
algorithms
sorting
bucketsort
expectation
descriptive
0
votes
0
answers
28
Cormen Edition 3 Exercise 8.4 Question 2 (Page No. 204)
Explain why the worstcase running time for bucket sort is $\Theta(n^2)$. What simple change to the algorithm preserves its linear averagecase running time and makes its worstcase running time $O(n\ lg\ n)$?
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

35
views
cormen
algorithms
sorting
bucketsort
descriptive
0
votes
1
answer
29
Cormen Edition 3 Exercise 8.4 Question 1 (Page No. 204)
BUCKETSORT(A) 1 let B[0...n1] be a new array 2 n = A.length 3 for i  0 to n  1 4 make B[i] an empty list 5 for i = 1 to n 6 insert A[i] into list B[nA[i]] 7 for i = 0 to n  1 8 sort list B[i] with ... ,B[n1] together in order illustrate the operation of BUCKETSORT on the array $A=\langle .79,.13,.16,.64,.39,.20,.89,.53,.71,.42\rangle$
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

51
views
cormen
algorithms
sorting
bucketsort
descriptive
+1
vote
1
answer
30
Cormen Edition 3 Exercise 8.3 Question 4 (Page No. 200)
Show how to sort $n$ integers in the range $0$ to $n^31$ in $O(n)$ time.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

75
views
cormen
algorithms
sorting
radixsort
descriptive
Page:
1
2
3
4
5
6
...
84
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
IITGN PGDIIT Fees/Placement/other info.
Online Python Programming Course by IIT Kanpur
CCMT (Portal for NIT admission) is now open
Generating Functions  All you need to know for GATE
The Truth about M.Tech Placements at IIIT Allahabad.
Follow @csegate
Recent questions tagged algorithms
Recent Blog Comments
It has been modified. For online admission you...
Is it true that final year students are not...
Is it true ?
I looked into its syllabus and there are some...
kudos bro you made it
51,840
questions
58,630
answers
200,017
comments
111,642
users