Awesome q2a theme
Ask us anything
Toggle navigation
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Blogs
Previous Year
Exams
Recent questions and answers in Algorithms
0
votes
0
answers
Average case analysis in Quicksort
In quick sort the time complexity equation is T(n)=T(k)+T(nk1)+⊝(n) in average case how does the equation comes out to be T(n)=T(n/9)+T(9n/10)+⊝(n) in Average case.
asked
Apr 4
in
Algorithms
by
soham04
(
5
points)

6
views
quicksort
0
votes
0
answers
made easy workbook
in this question since they are asking function time so it depends on n and so that’s y time is O(1)?
asked
Mar 27
in
Algorithms
by
G Shaheena
(
5
points)

10
views
selfdoubt
0
votes
1
answer
CRLS question 6.57
How to Implement a stack with a priority queue ?
answered
Mar 17
in
Algorithms
by
blank_manash
(
65
points)

13
views
algorithms
0
votes
0
answers
Made easy workbook
What is the correct answer for this question.Please give the detailed solution…..
asked
Mar 12
in
Algorithms
by
holla
(
5
points)

20
views
workbook
0
votes
0
answers
Made Easy Postal study material objective practice sets algorithmasymptotic analysis
asked
Mar 12
in
Algorithms
by
Harshit2021
(
5
points)

13
views
algorithms
0
votes
0
answers
Need to change the book content details
Here, Chapter 9 is missing. This makes me loose 2 marks. Because I blindly believed that the content described in this material is accurate. So plz update the latest content in this material.
asked
Mar 11
in
Algorithms
by
Raj_81
(
23
points)

14
views
algorithms
0
votes
1
answer
#self doubt #Algorithm #Spanning tree
True/False 1) Multiplying all edge weight by a positive number might change the graph MST. 2) If all edge in a graph have distinct weight than the shortest path between two vertices is unique. Please answer with reason. Thanks
answered
Feb 27
in
Algorithms
by
Deepakk Poonia (Dee)
(
1.5k
points)

20
views
datastructures
+1
vote
0
answers
#self doubt #Time complexity #tree
1) Time complexity to construct a Binary tree when inorder and preorder/postorder traversal of the tree is given. a) if inorder sorted b) if inorder is not sorted. 2) If construct Binary tree when preorder and postorder to the tree is given. .....… My answer: 1 a) O( nlogn) 1 b) O(nlogn) 2) O(2^n) Please check and correct Thanks
asked
Feb 27
in
Algorithms
by
Hradesh patel
(
9
points)

16
views
selfdoubt
binarytree
timecomplexity
0
votes
0
answers
Time Complexity
What is the time complexity of the following code? #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ char data; unsigned int freq; unsigned int parent, leftChild, rightChild; }HTNode, *HuffmanTree; typedef char** HuffmanCode; void ... HC; HuffmanTree HT; HuffmanCoding(HT, HC, word, c, len); PrintHuffmanCode(HC, word, c, len); return 0; }
asked
Feb 12
in
Algorithms
by
byebey
(
5
points)

21
views
timecomplexity
0
votes
1
answer
Selection sort
Can anybody explain me why the number of swaps in selection sort algorithm is (n1) in worst case ? Let's say the array is {6,5,4,3,2,1} then the number of swaps should be 5. But I think the no of swaps should be 3. Please explain.
answered
Feb 8
in
Algorithms
by
zxy123
(
3.6k
points)

36
views
algorithms
sorting
0
votes
0
answers
madeeasy test series
can we apply master theorm for 2T(n/2)+(n/logn) ? answer says no but as i am following extended master theorm it says we can…
asked
Feb 8
in
Algorithms
by
eyeamgj
(
29
points)

27
views
testseries
0
votes
0
answers
gate overflow book
https://gateoverflow.in/25666/tifr2013b5 The above is the link of the question. Just for the point that I have understood the solution correctly, I'm going to explain what I understood. First we are negating the edges, so any positive weight cycle ... again, we will be able to find whether there is a negative weight cycle reachable from the source. Is the explaination correct?
asked
Feb 6
in
Algorithms
by
hadarsh
(
5
points)

10
views
graph
algorithms
+1
vote
0
answers
ME Youtube video
Consider a given recursive algo: Algo rec(n) { if(n<=1) return(2) else { x=2*rec(n1) call f(x) } } f(x) { for(i=1; i<=x; i=i*2} printf("GATE"); } What is time complexity of rec(n)? (How to write recurrence relation for this?)
asked
Feb 3
in
Algorithms
by
sjoshis07
(
9
points)

28
views
algorithms
0
votes
1
answer
#algorithms #made0easy
Consider the following fragment of code Which of the following describes the time complexity a) b) c) ans given is a and c can someone explains please?
answered
Jan 27
in
Algorithms
by
Abhisheksmile94
(
347
points)

30
views
algorithms
0
votes
0
answers
GATE 200740 and GATE 200936
What is the proper definition for closed and open hashing? They seem to be used interchangeably in the following two questions Consider a hash table of size seven, with starting index zero, and a hash function (3x+4)mod7(3x+4)mod7. ... same table and methods like probing and double hashing. Right now I am just assuming that whenever linear probing to used closed.
asked
Jan 27
in
Algorithms
by
raving_sajeev
(
5
points)

13
views
selfdoubt
+1
vote
0
answers
Student selfdought
Void f(int n) { if(n<=1) return; f(n1); f(n1); } Q.1 ) what is total no of recursive calls in f(n) ? Q.2 ) what is the total no of calls in f(n) ?
asked
Jan 24
in
Algorithms
by
Enolx.21
(
49
points)

29
views
selfdoubt
0
votes
0
answers
GATE TIME COMPLEXITY
How to analyse the complexity for – for(i=2;i*i<=n;i++) like i know for i=2 it’ll run $\sqrt{n} $ times how to process further. sir zxy123, also which book i should refer for these as cormen or narsimha are not detailed for this topic.
asked
Jan 23
in
Algorithms
by
donniedarko
(
39
points)

35
views
timecomplexity
0
votes
1
answer
Made Easy Test Series
Time complexity of an algorithm $T(n)$ where n is the input size is given by $T(n)$ =$(T(n1)+1)/n$ if $n>1$ $T(n) = n$ otherwise $logn$ $n$ $n^2$ $n^n$
answered
Jan 22
in
Algorithms
by
Abhisheksmile94
(
347
points)

38
views
testseries
+1
vote
1
answer
ace test series
Hi, This might be a easy problem for everyone...but can i get some help...which one is greater 6nlogn or 2^logn...
answered
Jan 21
in
Algorithms
by
lokeshsharma123456
(
11
points)

40
views
timecomplexity
0
votes
0
answers
#madeeasy #algorithm #recurrence tree method
How i can find the height of this recurrence relation? T(n)=T( 9n / 10 )+ T( n / 10) + n
asked
Jan 18
in
Algorithms
by
Allica
(
13
points)

15
views
recurrence
trees
0
votes
0
answers
ME Test Series
I think it should be 4 since merge sort is also O(n*n), but they have given as 3. If they would have asked tightest bound, they 3 would have been correct.
asked
Jan 18
in
Algorithms
by
Abhineet Singh
(
23
points)

21
views
dsa
0
votes
0
answers
Applied Gate Test Series
IHow to calculate this ?
asked
Jan 17
in
Algorithms
by
ravisingh1651
(
19
points)

30
views
testseries
0
votes
0
answers
Previous Year Gate
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter. MultiDequeue(Q){ m = k while (Q is not empty and m > 0) { Dequeue(Q) m = m  1 } } What is the worst case time complexity of a sequence of n MultiDequeue() operations on an initially empty queue?
asked
Jan 17
in
Algorithms
by
Rishav Chetan
(
9
points)

15
views
queue
0
votes
0
answers
Previous Year GATE
The number of elements that can be sorted in Θ(log n) time using heap sort is ___________ .
asked
Jan 17
in
Algorithms
by
Rishav Chetan
(
9
points)

17
views
sorting
0
votes
1
answer
#gate2017 #algorithms
In question given below plz explain how we know that which searching algorithms is fit in Let A be an array of 31 numbers consisting of a sequence of 0’s followed by a sequence of 1’s. The problem is to find the smallest index i such that A[i] is 1 by probing the minimum number of locations in A. The worst case number of probes performed by an optimal algorithm is________.
answered
Jan 16
in
Algorithms
by
Abhisheksmile94
(
347
points)

33
views
plzz
explain
0
votes
1
answer
#algoritm#heap
What is the difference between max heap and max heapify..?
answered
Jan 16
in
Algorithms
by
Abhisheksmile94
(
347
points)

20
views
explain
0
votes
0
answers
#algorithm #kruskal's algo
What is minimum separator lemma?
asked
Jan 16
in
Algorithms
by
Allica
(
13
points)

11
views
algorithms
+1
vote
1
answer
Made easy Test seriesQuicksort
How much time it will take to sort n numbers by quicksort if some arbitrary algorithm takes (n2) time to choose pivot?
answered
Jan 15
in
Algorithms
by
bthebestSelf
(
5
points)

289
views
madeeasytestseries
0
votes
0
answers
Made Easy Test Series
How to Differentiate Option A and B?
asked
Jan 15
in
Algorithms
by
Parth27
(
163
points)

19
views
testseries
0
votes
1
answer
Made Easy Workbook Algorithms Chapter2 Q2
Solve the following with Substitution method only. $T(n) = 8T(n/2) + n^{2}logn$) n>0 T(1)=1 Note: The original question doesn’t say to solve with substitution only but i don’t like Master’s method.
answered
Jan 14
in
Algorithms
by
zxy123
(
3.6k
points)

27
views
algorithms
0
votes
1
answer
Self doubt :Time Complexity Iterative
Can Someone help me understand the timecomplexity of dependent loops? for example, Q1> int i,j; for(i=1;i<n;i=i++) { for(j=1;j<=i;j=j*2) } Q2> int i,j; for(i=1;i<=n/2;i=i++) { for(j=1;j<=i;j++) }
answered
Jan 13
in
Algorithms
by
zxy123
(
3.6k
points)

24
views
timecomplexity
selfdoubt
0
votes
1
answer
Made Easy Test Series
$A. O(n (logn)^2) $ $B. O(n^2 logn) $ $C. O(n^2) $ $D. O(n log(log(n)))$
answered
Jan 12
in
Algorithms
by
zxy123
(
3.6k
points)

20
views
testseries
0
votes
0
answers
Need of cycle checking algorithm in minimum spanning tree algorithms
asked
Jan 11
in
Algorithms
by
ashutoshbsathe
(
5
points)

14
views
algorithms
0
votes
0
answers
Applied Test Series
Given a complete undirected graph (with all edges having positive and non negative weights) of $7$ vertices the cost of the MST is known to be $32$, the maximum weight one edge can take is ___. Ans. given is $27$ but shouldn’t it be $32$ because a graph can be constructed with $w \in \{0,32\}$?
asked
Jan 8
in
Algorithms
by
toxicdesire
(
555
points)

24
views
mst
0
votes
0
answers
Madeeasy Testseries Algo Q1
Which of the following statements are true ? Negating all the edge weights in a weighted undirected graph G and finding the minimum spanning tree gives us the maximum weight spanning tree of the original graph G In a graph with unique edge weights ... probability p1 and p2. In a connected weighted graph, every lowest weight edge is always in some minimum spanning tree.
asked
Jan 2
in
Algorithms
by
Shivateja MST
(
45
points)

39
views
algorithms
0
votes
0
answers
Unacademy Test
“Rerunning Dijkstra’s algorithm on a graph V times will result in the correct shortestpath tree, even if there are negative weight edges (No ve weight cycles” I am thinking the answer is False because even though you run at all the vertices we will have the wrong value computed at each vertex. The answer is True as provided by them (No explanation)
[closed]
asked
Dec 31, 2020
in
Algorithms
by
badman
(
9
points)

24
views
algorithms
0
votes
2
answers
Made easy algorithms SW test
I didnt understand the solution. can any one explain more clearly with example?
answered
Dec 31, 2020
in
Algorithms
by
kalin
(
155
points)

33
views
algorithms
0
votes
0
answers
Algorithm:Doubt
Which of the following sorting algorithm gives the same number of swaps as that of the total inversion count in the array? Quick sort Selection sort Merge Sort Bubble Sort
asked
Dec 28, 2020
in
Algorithms
by
val_pro20
(
2
points)

21
views
algorithms
selfdoubt
+2
votes
0
answers
GateBook Full Length Test
Which of the following statements is/are true/correct ? A) Professor Ram gives a comparisonbased sorting algorithm that runs in T(n) = 2T(n1)+ 1. There is not enough information to know whether Ram's algorithm is correct. B) Professor ... base 6) so this also should not be the time complexity of a comparison based sorting algorithm. Can anyone confirm?.Thanks in advance
asked
Dec 28, 2020
in
Algorithms
by
Deterministic
(
31
points)

45
views
gatebook
algorithms
timecomplexity
0
votes
1
answer
UGC NET CS 2015 Jun  II
Which of the following algorithms sort n integers, having the range 0 to (n2  1), in ascending order in O(n) time ? A Selection sort B Bubble sort C Radix sort D Insertion sort
answered
Dec 24, 2020
in
Algorithms
by
eobard
(
5
points)

22
views
sorting
To see more, click for all the
questions in this category
.
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users
2021 Apr 12  18
Bikram
12 Points
chirudeepnamini
4 Points
Weekly Top User (excluding moderators) will get free access to
GATE Overflow Test Series for GATE 2021
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
Recent questions and answers in Algorithms
9,197
questions
3,182
answers
14,686
comments
96,162
users