Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged time-complexity
1
votes
2
answers
721
Worst Case Time Complexity
What is the worst case time complexity to find kth smallest element into an array of ‘n’ element?
What is the worst case time complexity to find kth smallest element into an array of ‘n’ element?
vishal chugh
1.8k
views
vishal chugh
asked
Jan 24, 2018
DS
algorithms
time-complexity
data-structures
sorting
+
–
2
votes
1
answer
722
Time Complexity
T(n)=4T(n/2)+n TC using iterative method with steps in short :) T(1) = 1
T(n)=4T(n/2)+nTC using iterative method with steps in short :)T(1) = 1
gauravkc
326
views
gauravkc
asked
Jan 24, 2018
Algorithms
algorithms
recurrence-relation
time-complexity
+
–
3
votes
1
answer
723
time complexity
time complexity questions like : h(n)=O(n2); f(n)= O(logn); g(n)=omega(n2); what is the complexity of :::: 1. h(n)-g(n)=?? 2. h(n)-f(n)=??? elaborate plz
time complexity questions like :h(n)=O(n2);f(n)= O(logn);g(n)=omega(n2);what is the complexity of :::: 1. h(n)-g(n)=?? 2. h(...
akankshadewangan24
396
views
akankshadewangan24
asked
Jan 22, 2018
Algorithms
time-complexity
asymptotic-notation
+
–
2
votes
0
answers
724
Algo:Time complexity
void fun(intn) { int s=0; for(i=1;i<=n;i++) { for(j=1;j<=i*i;j++) { if(j%i==0) { for(k=1;k<=j;K++) s++ } } } }
void fun(intn) { int s=0; for(i=1;i<=n;i++) { for(j=1;j<=i*i;j++) { if(j%i==0) { for(k=1;k<=j;K++) s++ } } } }
junaid ahmad
449
views
junaid ahmad
asked
Jan 22, 2018
Algorithms
time-complexity
algorithms
+
–
2
votes
1
answer
725
algorithms
Kaluti
373
views
Kaluti
asked
Jan 21, 2018
Algorithms
algorithms
time-complexity
test-series
+
–
2
votes
1
answer
726
Asymptotic Notation
Given h(n) < f(n) < g(n). statement 1: h(n)=O(f(n)); g(n)=Ω(f(n)) Statement 1 is True / False?
Given h(n) < f(n) < g(n).statement 1: h(n)=O(f(n)); g(n)=Ω(f(n))Statement 1 is True / False?
hacker16
910
views
hacker16
asked
Jan 21, 2018
Algorithms
asymptotic-notation
algorithms
time-complexity
+
–
6
votes
1
answer
727
Recurrence Relation
$T(n) = 2T(\sqrt{n}) + n$
$T(n) = 2T(\sqrt{n}) + n$
Shubhanshu
1.1k
views
Shubhanshu
asked
Jan 20, 2018
Algorithms
algorithms
time-complexity
recurrence-relation
+
–
2
votes
0
answers
728
Time Complexity
which function will grow faster? a) x$\sqrt{x}$ b) x!
which function will grow faster?a) x$\sqrt{x}$ b) x!
hacker16
520
views
hacker16
asked
Jan 20, 2018
Algorithms
algorithms
time-complexity
+
–
1
votes
1
answer
729
#Time Complexity
Aaditya Pundir
187
views
Aaditya Pundir
asked
Jan 20, 2018
Algorithms
algorithms
time-complexity
made-easy-test-series
+
–
4
votes
3
answers
730
please solve this Q
kallu singh
460
views
kallu singh
asked
Jan 20, 2018
Algorithms
time-complexity
recurrence-relation
test-series
+
–
3
votes
0
answers
731
Ace Test Series: Algorithm - Time Complexity
ashish pal
269
views
ashish pal
asked
Jan 20, 2018
Algorithms
ace-test-series
algorithms
time-complexity
+
–
4
votes
1
answer
732
Implementation of queue using stack
In implementation of queue using stack, deletion of second element from front take Ο(1) time, when insertion take Ο(n) time. Which of the following is correct ? True / False
In implementation of queue using stack, deletion of second element from front take Ο(1) time, when insertion take Ο(n) time.Which of the following is correct ?True / Fa...
Hemant Parihar
1.5k
views
Hemant Parihar
asked
Jan 20, 2018
DS
data-structures
queue
time-complexity
true-false
+
–
2
votes
1
answer
733
Complexity
#include<stdio.h> int calculate(int n) { int count=0; while(n!=0){ n=(n&(n<<1)); count++ } return count; } output for calculate(143)
#include<stdio.h int calculate(int n) { int count=0; while(n!=0){ n=(n&(n<<1)); count++ } return count; }output for calculate(143)
srestha
412
views
srestha
asked
Jan 19, 2018
Programming in C
time-complexity
+
–
1
votes
0
answers
734
MadeEasy Test Series 2018: Algorithms - Time Complexity
sumit chakraborty
513
views
sumit chakraborty
asked
Jan 18, 2018
Algorithms
algorithms
time-complexity
made-easy-test-series
+
–
1
votes
0
answers
735
Time Complexity
foo(int n, int a[]) { int i=0,j=0; for(i=0;i<=n;i++) while (j<n && A[i]<A[j]) j++; } Time complexity of foo()
foo(int n, int a[]) { int i=0,j=0; for(i=0;i<=n;i++) while (j<n && A[i]<A[j]) j++; }Time complexity of foo()
srestha
470
views
srestha
asked
Jan 17, 2018
Programming in C
time-complexity
algorithms
+
–
2
votes
0
answers
736
Complexity of given program.
Consider the following C segment: main() { int sum = 0; for(int b=1; b<=n; b*=2) { for(int i=0; i<b; i++) { for(int j=0; j<n; j+=2) { sum += j; } for(int j=1; j<n; j*=2) { sum *= j; } } } } The complexity of above program is ____________.
Consider the following C segment:main() { int sum = 0; for(int b=1; b<=n; b*=2) { for(int i=0; i<b; i++) { for(int j=0; j<n; j+=2) { sum += j; } for(int j=1; j<n; j*=2) {...
Rohit Gupta 8
1.0k
views
Rohit Gupta 8
asked
Jan 16, 2018
Programming in C
programming-in-c
time-complexity
+
–
1
votes
1
answer
737
Made-easy
A) Ο(logn) B) Ο(n logn) C) Ο(n)2 D) Ο(n2 logn)
A) Ο(logn)B) Ο(n logn)C) Ο(n)2D) Ο(n2 logn)
Nils
350
views
Nils
asked
Jan 16, 2018
Algorithms
algorithms
time-complexity
made-easy-test-series
+
–
3
votes
1
answer
738
Time Complexity
What is the time complexity of the following code? void foo(int n) { int s=0; for( i=1 ; i<=n ; i++ ) for( j=1 ; j<= i*i ; j++) if( j%i==0 ) { for( k=1 ; k<=j ; k++ ) s++; } }
What is the time complexity of the following code?void foo(int n) { int s=0; for( i=1 ; i<=n ; i++ ) for( j=1 ; j<= i*i ; j++) if( j%i==0 )...
Harsh Mehta
2.5k
views
Harsh Mehta
asked
Jan 16, 2018
Algorithms
time-complexity
algorithms
+
–
3
votes
1
answer
739
time complexity
pranab ray
628
views
pranab ray
asked
Jan 15, 2018
Algorithms
time-complexity
algorithms
asymptotic-notation
test-series
+
–
1
votes
0
answers
740
recurrence equation
what is recurrence relation of harmonic number/series ? and it's time complexity
what is recurrence relation of harmonic number/series ? and it's time complexity
iarnav
193
views
iarnav
asked
Jan 14, 2018
Algorithms
algorithms
time-complexity
recurrence-relation
+
–
3
votes
1
answer
741
quick sort
You have an array of n elements. Suppose you implement quick sort by always choosing the central element of the array as the pivot. Then the tightest lower bound for the best case performance is a) O(n2) b) O(nlogn) c) Θ(nlogn) d) O(n3)
You have an array of n elements. Suppose you implement quick sort by always choosing the central element of the array as the pivot. Then the tightest lower bound for the...
iarnav
2.5k
views
iarnav
asked
Jan 14, 2018
Algorithms
quick-sort
algorithms
sorting
time-complexity
+
–
0
votes
3
answers
742
time complexity
i am getting t.c as O(n^5) but given answer as O(n^4) what should be the answer
i am getting t.c as O(n^5) but given answer as O(n^4) what should be the answer
pranab ray
415
views
pranab ray
asked
Jan 13, 2018
Algorithms
time-complexity
algorithms
asymptotic-notation
test-series
+
–
1
votes
0
answers
743
MadeEasy Test Series 2018: Algorithms - Time Complexity
What is the worst case time complexity to count pairs of numbers with difference ‘k’ from an input array of ‘n’ numbers? a) O(logn) b) O(nlogn) c) O(n^2) d) O(n^2logn)
What is the worst case time complexity to count pairs of numbers with difference ‘k’ from an input array of ‘n’ numbers?a) O(logn)b) O(nlogn)c) O(n^2)d) O(n^2logn...
charul
737
views
charul
asked
Jan 12, 2018
Algorithms
algorithms
time-complexity
made-easy-test-series
madeeasy-testseries-2018
+
–
3
votes
1
answer
744
recurrence eq
how to solve this T(n)=T(n−1)+T(n−2) if T(0)=T(1)=1
how to solve this T(n)=T(n−1)+T(n−2) if T(0)=T(1)=1
iarnav
489
views
iarnav
asked
Jan 12, 2018
Algorithms
recurrence-relation
algorithms
time-complexity
discrete-mathematics
+
–
–1
votes
0
answers
745
recurrece relation stuck at some step.
j= n∗(1+1/2+1/2^2+1/2^3+..........1/2^k) how to solve this?
j= n∗(1+1/2+1/2^2+1/2^3+..........1/2^k) how to solve this?
iarnav
332
views
iarnav
asked
Jan 12, 2018
Algorithms
recurrence-relation
time-complexity
algorithms
+
–
2
votes
1
answer
746
recurrence using Master theorem
can we solve this T(n) = T(n/2) + 1 using master theorem?
can we solve this T(n) = T(n/2) + 1 using master theorem?
iarnav
1.1k
views
iarnav
asked
Jan 11, 2018
Algorithms
algorithms
master-theorem
time-complexity
+
–
0
votes
1
answer
747
recurrence relation
what is the recurrence relation for binary search and linear search? please explain how to derive them.
what is the recurrence relation for binary search and linear search?please explain how to derive them.
iarnav
431
views
iarnav
asked
Jan 11, 2018
Algorithms
recurrence-relation
algorithms
time-complexity
discrete-mathematics
+
–
0
votes
3
answers
748
Asympotic Notation
$100n\log n = O(n\log n)$ How they are equal?
$100n\log n = O(n\log n)$How they are equal?
iarnav
643
views
iarnav
asked
Jan 11, 2018
Algorithms
time-complexity
algorithms
asymptotic-notation
+
–
2
votes
1
answer
749
Algorithm Question
thepeeyoosh
1.0k
views
thepeeyoosh
asked
Jan 11, 2018
Algorithms
algorithms
time-complexity
test-series
+
–
1
votes
0
answers
750
test series
What will be the time complexity for the following recurrence relation? T(n)=n1/2 T(n1/2)+100n if n>1 = 1,Otherwise Θ(n) Θ(n2) Θ(n log n) Θ(n log logn) can anyone solve this question and give the solution.
What will be the time complexity for the following recurrence relation?T(n)=n1/2 T(n1/2)+100n if n>1= 1,Otherwise Θ(n) Θ(n2) Θ(n log n) Θ(n log logn) ...
Rajeev Kumar 1
250
views
Rajeev Kumar 1
asked
Jan 10, 2018
Algorithms
time-complexity
+
–
Page:
« prev
1
...
20
21
22
23
24
25
26
27
28
29
30
...
53
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register