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
1
answer
1
Time complexity
Please help to find the time complexity of this loop. void main() { int n; while(n>=1) { n=n2; } }
asked
1 day
ago
in
Algorithms
by
Devshree Dubey
Boss
(
13.6k
points)

20
views
timecomplexity
algorithms
0
votes
2
answers
2
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
1 day
ago
in
Algorithms
by
Tanuj Guha Thakurta
(
153
points)

20
views
timecomplexity
asymptoticnotations
0
votes
0
answers
3
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
5 days
ago
in
Algorithms
by
syncronizing
Junior
(
945
points)

63
views
timecomplexity
algorithms
recurrence
0
votes
1
answer
4
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
(
1.5k
points)

98
views
jest
algorithms
timecomplexity
0
votes
1
answer
5
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
(
1.5k
points)

50
views
jest
algorithms
timecomplexity
0
votes
1
answer
6
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
(
1.5k
points)

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

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

101
views
algorithms
timecomplexity
sorting
0
votes
1
answer
9
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
(
2.7k
points)

132
views
timecomplexity
algorithms
sorting
+1
vote
2
answers
10
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)

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

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

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

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

41
views
time
timecomplexity
+1
vote
1
answer
15
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
(
15.3k
points)

202
views
gb2019mock1
timecomplexity
0
votes
1
answer
16
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)

88
views
timecomplexity
algorithms
asymptoticnotations
0
votes
1
answer
17
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
(
565
points)

62
views
algorithms
sorting
timecomplexity
0
votes
0
answers
18
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)

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

66
views
algorithms
timecomplexity
madeeasytestseries
madeeasytestseries2019
0
votes
0
answers
20
Asymptotic notation
Let f(n) =O(n), g(n)=Ώ(n) and h(n)=Θ(n). Then g(n)+f(n).h(n) is _____? a Ω($n^{2}$) b Θ($n^{2}$) cΩ(n) dΘ(n)
asked
Jan 12
in
Algorithms
by
bts1jimin
(
245
points)

50
views
asymptoticnotations
algorithms
timecomplexity
0
votes
0
answers
21
Algorithms Time complexity
asked
Jan 12
in
Programming
by
Rackson
Active
(
1.9k
points)

42
views
timecomplexity
algorithms
asymptoticnotations
0
votes
0
answers
22
Gateforum Test Series: Algorithms  Time Complexity
asked
Jan 9
in
Algorithms
by
Gupta731
Active
(
4.5k
points)

51
views
gateforumtestseries
algorithms
timecomplexity
+2
votes
0
answers
23
MadeEasy Test Series: Algorithms  Time Complexity
Ω($n^2$) Ω($nlogn$) and O($n^2$) Θ(n) O(n)
asked
Jan 8
in
Algorithms
by
Ramij
(
353
points)

98
views
madeeasytestseries
algorithms
timecomplexity
array
0
votes
0
answers
24
MadeEasy Test Series: Algorithms  Time Complexity
Please show the ideal way to deal with such comparisons as I am getting g>=f IN genral what logic shall be followed to analyse such complex comparions?
asked
Jan 6
in
Algorithms
by
Markzuck
Junior
(
633
points)

37
views
algorithms
asymptoticnotations
madeeasytestseries
timecomplexity
0
votes
0
answers
25
Recurrence relation
T(n) = T(n/4) + T(3n/4) + n How to solve these type of problems? Can I solve this using master theorm by considering X = T(3N/4) +N THEN T(N) = T(N/4) +X CAN WE SOLVE LIKE THIS? PLEASE HELP
asked
Jan 4
in
Algorithms
by
Mayankprakash
Active
(
1.1k
points)

107
views
recurrenceeqation
timecomplexity
recurrence
algorithms
0
votes
0
answers
26
Time complexity (Advance Level)
The difference of time Complexity between given functions can be represented by: void fun1(int n) { for(int i=1;i<=n;i++) for(int j=1;j<=i*i;j++) if(j%i==0) for(int k=1;k<=j;k++) s++; return 0; } void fun2(int n) { for(int i=1;i<=n;i++) for(int j=1;j<=i*i;j++) for(int k=1;k<=j;k++) s++; return 0; } $i. O(n^2)$ $ii. O(n)$ $iii.O(1)$ $iv. O(n^{1.5})$
asked
Jan 4
in
Algorithms
by
shreyansh jain
Active
(
2.1k
points)

74
views
timecomplexity
asymptoticnotations
algorithms
0
votes
1
answer
27
Time Complexity of Code snippet
What will be the worst case time complexity for the following code segment? int count=0,N; for(i=0;i<N*2;i++){ for(j=0;j<i/3;i++){ for(k=0;k<j*j;k++){ count++; } } } Options: O(N^4) O(N^3) O(N^2) O(N)
asked
Jan 4
in
Algorithms
by
saptarshiDey
(
83
points)

105
views
timecomplexity
algorithms
asymptoticnotations
0
votes
0
answers
28
Time complexity
How to analyze this problem For (I=1;I<n;I++) { For (j=1;j<n;j=j+I) { Print("℅d℅d", I,j); } } Please suggest I'm detail how do we unroll I & j.
asked
Jan 3
in
Algorithms
by
Mayankprakash
Active
(
1.1k
points)

40
views
timecomplexity
algorithms
0
votes
0
answers
29
MadeEasy Test Series: Algorithms  Time Complexity
asked
Jan 2
in
Algorithms
by
CHïntän ÞäTël
(
275
points)

49
views
madeeasytestseries
#algorithms
timecomplexity
0
votes
0
answers
30
Zeal Test Series 2019: Algorithms  Time Complexity
A sorted array of n elements which has been circularly shifted. For example, {18,25,1,5,11,16} is a sorted array that has been circularly shifted by 2 positions. suppose a person has to find the largest element in a circularly shifted array. Here, there ... been shifted is unknown. find time complexity. 1. O(nlogn) 2. O(n) 3. O(n^2) 4. O(logn)
asked
Jan 2
in
Algorithms
by
Prince Sindhiya
Loyal
(
6.2k
points)

46
views
zeal
algorithms
timecomplexity
zeal2019
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 Gandhinagar review
Is DAIICT good for doing MTech ?
AIR175 : GO is enough
GATE 2019 My reasoned routine. (AIR 558)
if i can you also can
Follow @csegate
Recent questions tagged timecomplexity
Recent Blog Comments
congrats man!!! u surely need guts to leave job...
You won't get M.Tech degree then
I have generic query , not just about iit gn but...
Thank you Abhishek
Heartliest Congratulation Abhishek Bhai. This was...
48,515
questions
52,763
answers
183,377
comments
68,235
users