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 timecomplexity
0
votes
0
answers
1
Made Easy Test Series:AlgorithmTime Complexity
Consider a procedure $find()$ which take array of $n$ integers as input, and produce pair of element of array whose difference is not greater than the difference of any other pair of element of that array. Which of the following represent ... Here we need to sort first and then need to compare adjacent element right?? Then what will be complexity??
asked
5 days
ago
in
Algorithms
by
srestha
Veteran
(
114k
points)

35
views
algorithms
madeeasytestseries
timecomplexity
0
votes
0
answers
2
Made Easy Test Series: AlgorithmReverse Polish Notation
Consider the neworder strategy for traversing a binary tree: Visit the root Visit the right subtree using neworder Visit the left subtree using neworder The neworder traversal of expression tree corresponding to the reverse polish expression 3 4 * 5 – 2 ^ 6 7 * 1 + – What will be expression, any procedure for it??
asked
May 16
in
Compiler Design
by
srestha
Veteran
(
114k
points)

40
views
infixpostfix
algorithms
timecomplexity
0
votes
1
answer
3
Made Easy Test Series:AlgorithmRecurrence Relation
What is the solution of recurrence relation $T\left ( n \right )=T\left ( n1 \right )+n$
asked
May 10
in
Algorithms
by
srestha
Veteran
(
114k
points)

44
views
algorithms
timecomplexity
recurrenceeqation
+1
vote
0
answers
4
GO screening test
Which one of the following notations is most relevant for finding the best algorithm for a problem? (A) $o(f(n))$ (B) $O(f(n))$ (C) $\omega (f(n))$ (D) $ \Omega (f(n))$
asked
May 9
in
Algorithms
by
toxicdesire
Junior
(
695
points)

92
views
timecomplexity
algorithms
goscreeningtest
0
votes
1
answer
5
Made Easy Test Series:Time Complexity
Consider the following program: int Bar(int n){ if(n<2) return; } else{ int sum=0; int i,j; for(i=1;i<=4;i++) Bar(n/2); for(i=1;i<=n;i++){ for(j=1;j<=i;j++){ sum=sum+1; } } } Now consider the following ... $Bar\left ( n \right )$ is $O \left ( n^{3}logn^{2} \right )$ How many statements are correct________________
asked
May 7
in
Algorithms
by
srestha
Veteran
(
114k
points)

41
views
madeeasytestseries
algorithms
timecomplexity
+1
vote
1
answer
6
IIIT PGEE 2019
What is the time complexity to delete an arbitrary node from binary heap? O(n) O(log n) O(1) O(n log n)
asked
Apr 29
in
Programming
by
manikgupta123
(
115
points)

112
views
iiithpgee
timecomplexity
binaryheap
0
votes
1
answer
7
IIIT PGEE 2019
Which of the following gives O(1) complexity if we want to check whether an edge exists between two given nodes in a graph? Adjacency List Adjacency Matrix Incidence Matrix None of these
asked
Apr 29
in
DS
by
manikgupta123
(
115
points)

87
views
iiithpgee
graphtheory
timecomplexity
+2
votes
1
answer
8
IIIT PGEE 2019
What is the time complexity for insertion in binary tree in worst case? O(1) O(log n) O(n) O(n log n)
asked
Apr 29
in
Programming
by
manikgupta123
(
115
points)

117
views
iiithpgee
binarytree
timecomplexity
+1
vote
1
answer
9
If there is an $\rm NP$complete language $L$ whose complement is in $\rm NP$, then...
asked
Apr 20
in
Theory of Computation
by
Rhythm
(
197
points)

90
views
theoryofcomputation
timecomplexity
pnpnpcnph
+1
vote
0
answers
10
Find Asymptotic upper bound (http://www.csd.uwo.ca/~moreno/CS433CS9624/Resources/master.pdf)
asked
Apr 19
in
Algorithms
by
Mk Utkarsh
Boss
(
35.4k
points)

79
views
asymptoticnotations
timecomplexity
0
votes
0
answers
11
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
(
249
points)

124
views
algorithms
timecomplexity
selfdoubt
0
votes
1
answer
12
Time complexity
Please help to find the time complexity of this loop. void main() { int n; while(n>=1) { n=n2; } }
asked
Mar 19
in
Algorithms
by
Devshree Dubey
Boss
(
14k
points)

70
views
timecomplexity
algorithms
0
votes
2
answers
13
Self doubt
O(n1)+O(n)=O(n) O(n/2)+O(n)=O(n) but O(1)+O(2)+O(3)+...+O(n)=O(n(n+1)/2)=O(n^2) why?
asked
Mar 19
in
Algorithms
by
Tanuj Guha Thakurta
(
153
points)

51
views
timecomplexity
asymptoticnotations
0
votes
0
answers
14
Time complexity
Is this the correct way to solve ? Q) int algorithm(int n) { int sum =0;k,j; for (k=0;k<n/2;k++) for(j=0;j<10;j++) sum++; return 4*algorithm(n/2)*algorithm(n/2)+algorithm(n/2)*algorithm(n/2) }
asked
Mar 15
in
Algorithms
by
syncronizing
Junior
(
941
points)

102
views
timecomplexity
algorithms
recurrence
0
votes
1
answer
15
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
(
2.6k
points)

105
views
jest
algorithms
timecomplexity
0
votes
1
answer
16
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
(
2.6k
points)

57
views
jest
algorithms
timecomplexity
0
votes
1
answer
17
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
(
2.6k
points)

28
views
jest
algorithms
timecomplexity
+1
vote
6
answers
18
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
(
400k
points)

3.6k
views
gate2019
algorithms
timecomplexity
0
votes
0
answers
19
Can Merge Sort Time Complexity be O(n^2) in any condition?
asked
Feb 1
in
Algorithms
by
aditykansara
(
23
points)

120
views
algorithms
timecomplexity
sorting
0
votes
1
answer
20
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
(
3k
points)

160
views
timecomplexity
algorithms
sorting
+1
vote
2
answers
21
from edurev
Consider an interpolation search which is an improvement over binary search where the values in a sorted array are uniformly distributed.In interpolation search construction of new data points take place at different location according to the value of the key being searched.Find the time complexity ... . A.O(logn) B.O(n) C.O(n logn) D.O(log(logn)) Please explain by taking an example
asked
Jan 26
in
Algorithms
by
Megha_2019
(
31
points)

86
views
algorithms
timecomplexity
0
votes
1
answer
22
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)

22
views
algorithms
timecomplexity
0
votes
0
answers
23
Time complexity
Time complexity of second part?
asked
Jan 22
in
Algorithms
by
bts1jimin
(
283
points)

30
views
timecomplexity
0
votes
1
answer
24
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
(
267
points)

123
views
timecomplexity
algorithms
recurrence
recurrenceeqation
0
votes
1
answer
25
Time complexity
asked
Jan 20
in
Algorithms
by
Rackson
Active
(
1.9k
points)

42
views
time
timecomplexity
+1
vote
1
answer
26
GATEBOOK2019 Mock Test152
The intended purpose of this code is to precompute all the primes less than $N.$ When it is finished executing, for $r \in [2, N),$ $bits[r]$ is supposed to equal $1$ if and only if $N$ is composite. Assume that the bits array is initialized to all zeroes. for ... $n < N$ is prime. I only I and II only II and III only I, II, and III
asked
Jan 19
in
Algorithms
by
GATEBOOK
Boss
(
17.3k
points)

204
views
gb2019mock1
timecomplexity
0
votes
1
answer
27
Time Complexity
I am unable to Find its time complexity using Iterative method… Will any one help me out with this . Thank you :)
asked
Jan 18
in
Algorithms
by
Nandkishor3939
Active
(
1.2k
points)

98
views
timecomplexity
algorithms
asymptoticnotations
0
votes
1
answer
28
sorted list
we are given (log m) sorted list each of size (log n) / (log m) the time complexity of merging list into single sorted list using mergesort is equal to a) O ( log m log(log n) ) b) O ( log n log(log m) ) c) O ( log m log n) d) O ( m log log n)
asked
Jan 16
in
Algorithms
by
Rahul_Rathod_
Junior
(
561
points)

94
views
algorithms
sorting
timecomplexity
0
votes
0
answers
29
Finding the minimum element in a Heap
I was going through the heap concept and one question came into my mind what will be the best case time complexity of finding the minimum element in a max heap? Thank you:)
asked
Jan 15
in
DS
by
Nandkishor3939
Active
(
1.2k
points)

151
views
heap
binaryheap
timecomplexity
0
votes
0
answers
30
MadeEasy Subject Test 2019: Algorithms  Time Complexity
asked
Jan 15
in
Algorithms
by
Pratik Gawali
Junior
(
919
points)

84
views
algorithms
timecomplexity
madeeasytestseries
madeeasytestseries2019
Page:
1
2
3
4
5
6
...
27
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 Kanpur MS Interview experience
My GATE preparation and what you can learn from it
IIT Bombay RA (2019) Programming Questions
COAP Round 1 has started
MTECH (COUURSE WORK) AI INTERVIEW EXPERIENCE 2019
Follow @csegate
Recent questions tagged timecomplexity
Recent Blog Comments
It was free when I gave them, maybe they made it...
The tests are there but it ain't free. Cost is...
They removed their tests recently, I think it'll...
how did you get Success gateway test series for...
49,427
questions
53,611
answers
185,914
comments
70,885
users