The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
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
Asymptotic Complexity
$T\left ( n,c \right )=\Theta \left ( n \right )$ for $c\leq 2$ $T\left ( c,n \right )=\Theta \left ( n \right )$ for $c\leq 2$ $T\left ( n,n \right )=\Theta \left ( n \right )+T\left ( n,\frac{n}{2} \right )$ How to find complexity for this recurrence relation?
asked
2 days
ago
in
Algorithms
by
srestha
Veteran
(
86.9k
points)

53
views
algorithms
timecomplexity
asymptoticnotations
0
votes
1
answer
2
SelfDoubt
What will be the timecomplexity of the following ? for(i=1;i<=n;i=i*2) { for(j=0;j<i;j++) { count++; } }
asked
3 days
ago
in
Algorithms
by
Phlegmatic
(
177
points)

65
views
timecomplexity
0
votes
1
answer
3
#selfdoubt
Find the time complexity? for(i=1;i<=n;i++) { for(j=1;j<i;j++) { if((i℅j)==0) { for (k=1;k<=n;k++) { sum+=k; } } } }
asked
4 days
ago
in
Algorithms
by
Naveen Kumar 3
(
453
points)

63
views
timecomplexity
+2
votes
1
answer
4
Algorithm
Which of the given options provides the increasing order of asymptotic complexity of functions $f1$, $f2$, $f3$ and $f4$? $f1(n) = 2^n \\ f2(n) = n^{(3/2)} \\ f3(n) = nlogn \\ f4(n) = n^{(logn)}$ How $n^{3/2}$ is greater than $n^{logn}$
asked
6 days
ago
in
Algorithms
by
shipra tressa
(
223
points)

86
views
algorithms
timecomplexity
0
votes
0
answers
5
time complexity
what is the time complexity of the $pow()$ ?
asked
Jun 17
in
Algorithms
by
vijju532
(
97
points)

41
views
timecomplexity
algorithms
0
votes
0
answers
6
How to calculate the average case time complexity in linear search for a successful and unsuccessful search ?
asked
Jun 17
in
Algorithms
by
radha gogia
Loyal
(
7.1k
points)

51
views
algorithms
timecomplexity
linearsearch
0
votes
1
answer
7
Time complexity
$T(n) = T(n2) + 2logn, \text{ if } n>1 \\ =1, \text{ if } n=1$ Find the Time Complexity.
asked
Jun 17
in
Algorithms
by
shweta sah
(
45
points)

59
views
algorithms
timecomplexity
0
votes
1
answer
8
Time complexity
What is the time complexity of the following recursive function : int DoSomething(int n) { if (n <= 2) return 1; else return DoSomething(floor(sqrt(n)))+ n; } $\theta(n^2)$ $\theta(n \log_2 n)$ $\theta(\log_2 n)$ $\theta(\log_2 \log_2 n)$
asked
Jun 17
in
Algorithms
by
shweta sah
(
45
points)

40
views
algorithms
timecomplexity
recurrence
0
votes
0
answers
9
Time Complexity
What will be the time complexity of the following algorithm ? A(n){ if(n<=1) return 1; for(i=1;i<n;i++){ for(j=0;j<3;j++){ A(n1) } } }
asked
Jun 17
in
Algorithms
by
kartikeya2812
(
7
points)

43
views
timecomplexity
algorithms
asymptoticnotations
recursion
0
votes
0
answers
10
Sorting
You are asked to sort 15 randomly generated numbers. One should prefer  1. Bubble Sort 2. Quick Sort 3. Merge Sort 4. Heap Sort Please explain why others 3 sorting algorithms except the answer can't be used ?
asked
Jun 15
in
Algorithms
by
Rahul Ranjan 1
(
121
points)

50
views
sorting
algorithms
timecomplexity
heapsort
mergesort
0
votes
1
answer
11
Complexity for nested loop
Hi.... how to find complexity for this algorithm f=1; x=3; for (int i = 1; i <= n; i*=2) for (int j = 1; j <= i * i; j++) if (i % j == 0) for (int k = 1; k <= j; k++) f=f*x;
asked
Jun 13
in
Algorithms
by
sweet heart
(
7
points)

43
views
algorithms
timecomplexity
0
votes
1
answer
12
#DataStructure Time Complexity in Sorted Array.
asked
Jun 12
in
DS
by
iarnav
Loyal
(
7.3k
points)

56
views
algorithms
timecomplexity
arrays
datastructure
0
votes
0
answers
13
Algo: Time Complexity
What is the time complexity of the following piece of code in the terms of n? $Main()$ { $n=2^{2^k};$ $for(i=1; i<=n; i++)$ { $j=2;$ $while(j<=n)$ { $j=j^2;$ } } }
asked
Jun 12
in
Algorithms
by
pbhati
(
35
points)

48
views
algorithms
timecomplexity
0
votes
0
answers
14
Mission IIT Screening Test
asked
Jun 11
in
Algorithms
by
Naveen Kumar 3
(
453
points)

61
views
timecomplexity
+1
vote
1
answer
15
Extended Master's Theorem $T(n)=n^{1/2}T(n^{1/2})+n$
asked
Jun 11
in
Algorithms
by
Hardik Maheshwari
(
49
points)

71
views
timecomplexity
algorithms
mastertheorem
asymptoticnotations
recurrence
0
votes
3
answers
16
Time Complexity
What is the time complexity of the following code? for(i=n;i>=1;) i=i/2;
asked
Jun 10
in
Algorithms
by
Devshree Dubey
Boss
(
12.3k
points)

83
views
algorithms
timecomplexity
+1
vote
2
answers
17
Cormen
T(n)=T(n1)+2n where T(1)=1 Solve recurrence relation
asked
Jun 8
in
Algorithms
by
vijju532
(
97
points)

69
views
recurrenceeqation
algorithms
asymptoticnotations
timecomplexity
0
votes
1
answer
18
Gate_2019_Mock_Paper
Please explain it
asked
Jun 7
in
Algorithms
by
Harikesh Kumar
Active
(
1.4k
points)

65
views
datastructure
algorithms
timecomplexity
0
votes
0
answers
19
Complexity
#DAA Prove that if: f(n) = amnm + am1nm1 + am2nm2 + am3nm3 + .........+ a1n + a0 then f(n) = O(nm) .
asked
Jun 6
in
Algorithms
by
Naveen Kumar 3
(
453
points)

27
views
algorithms
timecomplexity
asymptoticnotations
+1
vote
2
answers
20
Analysis of algorit
Which of the following statements is/are valid? 1. Time Complexity of QuickSort is Θ(n^2) 2. Time Complexity of QuickSort is O(n^2) 3. For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and f(n) = Ω(g(n)). 4. Time complexity of all computer algorithms can be written as Ω(1)
asked
Jun 6
in
Algorithms
by
jatinkumar
(
203
points)

42
views
timecomplexity
algorithms
asymptoticnotations
+1
vote
1
answer
21
Sorting
Which sorting algorithm is good if we already knew the range of number  Counting Sort OR Radix Sort
asked
Jun 5
in
DS
by
jatinkumar
(
203
points)

67
views
sorting
timecomplexity
algorithms
+4
votes
3
answers
22
Time complexity , Recursion
Why is recursive equation of following code $T(n)=T(n/2)+O(1)$, not $T(n)=8*T(n/2)+O(1)$? int x=0; int A(n) { if(n==1) return 1; else { X+=8A(n/2)+n^3; } return X; }
asked
May 29
in
Algorithms
by
bts
(
107
points)

113
views
recursion
timecomplexity
algorithms
mastertheorem
0
votes
1
answer
23
Dijkstra Time Complexity using Binary Heap
asked
May 22
in
Algorithms
by
iarnav
Loyal
(
7.3k
points)

52
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
1
answer
24
Time complexity
Which of the following sorting algorithm has almost the same worst case and best case complexity? 1 Quick Sort 2 Merge Sort 3 Shell Sort 4 Heap Sort PS: Is it heap or shell, I am confused. Please clarify me.
asked
May 18
in
Algorithms
by
Shumile
(
51
points)

72
views
timecomplexity
0
votes
1
answer
25
Big O
asked
May 10
in
Algorithms
by
Sanjay Sharma
Boss
(
48.2k
points)

62
views
asymptoticnotations
timecomplexity
+1
vote
1
answer
26
Time complexity
show how to sort n number in the range [0,n^21] in O(n)time?
asked
May 8
in
Algorithms
by
once_2019
(
177
points)

66
views
timecomplexity
algorithms
0
votes
1
answer
27
Evaluation of Postfix expression using stack
asked
May 6
in
DS
by
JaiKumar Guwalani
(
11
points)

124
views
datastructure
timecomplexity
spacecomplexity
infixpostfix
stack
+2
votes
0
answers
28
Algorithm
You have an array A with n JPEG images some of which are identical. You can check if two objects are equal but you cannot compare them in any other wayi.e. you can check A[i] == A[j] and A[i] != A[j], but comparisons such as A[i] < A[j] ... of its elements are equal to each other. Use divide and conquer to come up with an O(n logn ) algorithm to determine if A has a majority element.
asked
May 2
in
Algorithms
by
Kushagra Chatterjee
Loyal
(
8.2k
points)

88
views
algorithms
timecomplexity
divideandconquer
0
votes
1
answer
29
Data structure
What is the running time of the function? Int function(int n) { If(n<=1)return; For(int i=1;i<n;i++); For(int j=0;j<3;j++); Function (n1);
asked
May 1
in
Programming
by
Pramod Sharma 1
(
7
points)

48
views
timecomplexity
+2
votes
1
answer
30
time complexity
$f(n)=2n^2+ n log n$ $g(n)= \dfrac{n}{logn} + log^2n$ then $f(n)\times g(n)$ is: $n^2logn$ $\dfrac{n^3}{logn}$ $n^3log^2n$ $n^2log^2n$
asked
Apr 30
in
Algorithms
by
sumit_kumar
(
299
points)

66
views
timecomplexity
algorithms
Page:
1
2
3
4
5
6
...
20
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
IISc CSA and CDCS written test and interview Experince
IIIT Hyderabad Interview Experience
My failure, Oh wait SUCCESS journey
ALGORITHMS CHECKLIST:
A Failure who got into IISc
Follow @csegate
Gatecse
Recent questions tagged timecomplexity
Recent Blog Comments
Sir I didn't get an email for GO classroom, ...
any one with marks less than 125 selected?
Thank you @Arjun Sir, @NamitaAIR1, @Priyanka, ...
Your story is very inspiring for the boys like me ...
So you completed your Btech in 5 yrs? How could ...
36,194
questions
43,647
answers
124,088
comments
42,928
users