Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged time-complexity
3
votes
1
answer
121
Google
$Find \ Time \ Complexity :$ $T(n) =$ $n^{\frac{1}{3}}$ . T($n^{\frac{2}{3}}$) + $\Theta (n)$
$Find \ Time \ Complexity :$ $T(n) =$ $n^{\frac{1}{3}}$ . T($n^{\frac{2}{3}}$) + $\Theta (n)$
AniMan_7
386
views
AniMan_7
asked
Nov 8, 2022
Algorithms
algorithms
time-complexity
self-doubt
+
–
0
votes
0
answers
122
Ace academy test series
Time Complexity in C will be O(n) right? and big omega (n) is also big omega (n^2), then why is c incorrect?
Time Complexity in C will be O(n) right? and big omega (n) is also big omega (n^2), then why is c incorrect?
Neelu Lalchandani
338
views
Neelu Lalchandani
asked
Nov 2, 2022
Algorithms
ace-test-series
algorithms
time-complexity
+
–
0
votes
0
answers
123
I have a algorithm and i want to prove with induction, need help!
Hello, i have a algorithm and i want to prove it with induction how can i do that ? Also i want to worst case run time analyze but i am not very good please help me please. Thank you so much!
Hello, i have a algorithm and i want to prove it with induction how can i do that ?Also i want to worst case run time analyze but i am not very good please help me please...
mdboi
305
views
mdboi
asked
Oct 29, 2022
Algorithms
algorithms
sorting
time-complexity
+
–
1
votes
1
answer
124
𝑇(𝑛)=16𝑇(𝑛/4)+5𝑛^3 using the master theorem
how do i apply master theorem to this? 𝑇(𝑛)=16𝑇(𝑛/4)+5𝑛^3
how do i apply master theorem to this? 𝑇(𝑛)=16𝑇(𝑛/4)+5𝑛^3
mdboi
765
views
mdboi
asked
Oct 28, 2022
Algorithms
algorithms
master-theorem
recurrence-relation
asymptotic-notation
time-complexity
+
–
0
votes
1
answer
125
Madeeasy Algorithm
How to solve this recurrence relation T(n)= T(0.09n) + T(0.91n) + cn where c is constant and T(1)=1 options are-
How to solve this recurrence relationT(n)= T(0.09n) + T(0.91n) + cnwhere c is constant and T(1)=1options are-
Shreya2002
1.1k
views
Shreya2002
asked
Oct 27, 2022
Algorithms
made-easy-test-series
algorithms
time-complexity
recurrence-relation
+
–
0
votes
1
answer
126
UGC NET CSE | October 2022 | Part 1 | Question: 87
Consider the following algorithms and their running times : Algorithms Complexities (A) Breadth First Search (I) $\theta(v+E)$ (B) Rabin-Karp Algorithm (II) $O(v+E)$ (C) Depth-First Search (III) $\theta((n-m-1) m)$ (D) Heap sort (worst case) (IV) $O\left(n^2\right)$ (E) ... $\text{(A)-(III), (B)-(I), (C)-(II), (D)-(IV), (E)-(V)}$
Consider the following algorithms and their running times :AlgorithmsComplexities(A) Breadth First Search(I) $\theta(v+E)$(B) Rabin-Karp Algorithm(II) $O(v+E)$(C) Depth-F...
admin
305
views
admin
asked
Oct 23, 2022
Algorithms
ugcnetcse-oct2022-paper1
algorithms
time-complexity
match-the-following
+
–
0
votes
1
answer
127
Algorithms
how O($n^{2}$) in the last.(in the given solution).
how O($n^{2}$) in the last.(in the given solution).
Overflow04
416
views
Overflow04
asked
Oct 9, 2022
Algorithms
algorithms
time-complexity
test-series
+
–
1
votes
0
answers
128
AVL Trees
Given a skew tree what will be the time complexity to balance the tree? What will be the algorithm for this?
Given a skew tree what will be the time complexity to balance the tree? What will be the algorithm for this?
Chaitanya Kale
413
views
Chaitanya Kale
asked
Oct 9, 2022
Programming in C
avl-tree
data-structures
time-complexity
+
–
0
votes
0
answers
129
Algorithms
Is it really coping operation will take O(n). Does copy is done character by character. means simple code like (in c++) for(int i=0;i<n;i++) { s=s; } will take O($n^{2}$)
Is it really coping operation will take O(n).Does copy is done character by character.means simple code like (in c++) for(int i=0;i<n;i++){s=s;}will take O($n^{2}$)
Overflow04
287
views
Overflow04
asked
Oct 9, 2022
Algorithms
algorithms
time-complexity
test-series
+
–
0
votes
0
answers
130
Computer Networks
I am not getting the question.(Please explain me the question first).
I am not getting the question.(Please explain me the question first).
Overflow04
342
views
Overflow04
asked
Oct 9, 2022
Algorithms
algorithms
test-series
time-complexity
+
–
0
votes
0
answers
131
CLRS
A long distance runner wants to carry only a single water bottle along the route and she can run k miles on one bottle of water. Before the race, she is given a map of all n watering stops (i.e. mile markers of these stops). Assume that the distance ... is the number of miles runner can run on a bottle of water Output: Sequence S of watering stops for the runner minimizing number of stops
A long distance runner wants to carry only a single water bottle along the route and she can run k miles on one bottle of water. Before the race, she is given a map of al...
LRU
280
views
LRU
asked
Oct 8, 2022
Algorithms
algorithms
graph-algorithms
time-complexity
+
–
3
votes
3
answers
132
unacademy combat
what will be time complexity of this program? void function(int n) { int count = 0; for (int i=0; i<n; i++) { for (int j=1; j< i*i; j++) { if (j%i == 0) { for (int k=0; k<j; k++) printf("*"); } } } }
what will be time complexity of this program?void function(int n){ int count = 0; for (int i=0; i<n; i++) { for (int j=1; j< i*i; j++) { ...
viral8702
1.4k
views
viral8702
asked
Sep 26, 2022
Algorithms
algorithms
time-complexity
unacademy-combat
+
–
0
votes
3
answers
133
Self doubt.
What is the time & space complexity of this algorithm? Main() { for(i=n; i>10; i=i^1/4) { for(j=201; j<n^3; j=j+400) { for(k=47; k<=n^84; k=k*108) { k=k^61; } } } }
What is the time & space complexity of this algorithm?Main(){ for(i=n; i>10; i=i^1/4) { for(j=201; j<n^3; j=j+400) ...
Nisha Bharti
752
views
Nisha Bharti
asked
Sep 26, 2022
Algorithms
algorithms
time-complexity
space-complexity
self-doubt
+
–
0
votes
0
answers
134
PhD Admissions Written Test (Basic)
Let A be a sorted array of distinct integers of length n. Design an algorithm to find an index i such that A[i] = i if such an index exists. If there are more than one such indices, you may output any one ... −1. The asymptotic time complexity of the fastest algorithm for this problem, assuming the array is already available, is Θ ______________________________
Let A be a sorted array of distinct integers of length n. Design an algorithm to find an index i such that A[i] = i if such an index exists. If there are more than one su...
rsansiya111
472
views
rsansiya111
asked
Sep 10, 2022
Others
sorting
array
time-complexity
asymptotic-notation
+
–
0
votes
1
answer
135
Data structures and algorithms
Assume Two-Dimensional Sorted Array (TDSA) is a two-dimensional matrix of size n × n such as the elements in the matrix are sorted row-wise and column-wise. For example, the following matrix is a TDSA. 1 2 3 4 5 6 7 8 9 Write an algorithm that should convert the given matrix of a dimension n × n into TDSA. Analyse the running time of the algorithm.
Assume Two-Dimensional Sorted Array (TDSA) is a two-dimensionalmatrix of size n × n such as the elements in the matrix are sortedrow-wise and column-wise. For example, t...
Karthi2003
438
views
Karthi2003
asked
Sep 9, 2022
DS
algorithms
sorting
time-complexity
+
–
0
votes
0
answers
136
Data structures and algorithms
Compute the running time for the following algorithm ALGORITHM RKU(a,k,n) //Input: a is an array of n element and k is a value { if( k == n) then { WRITE(a[1:n]); return 0; } else { for i ← k to n do { t ← a[k]; a[k] ← a[i]; a[i] ← t; RKU(a, k+1, n); t ← a[k]; a[k] ← a[i]; a[i] ← t; } }
Compute the running time for the following algorithmALGORITHM RKU(a,k,n)//Input: a is an array of n element and k is a value{if( k == n) then{WRITE(a[1:n]);return 0;}else...
Karthi2003
355
views
Karthi2003
asked
Sep 9, 2022
DS
algorithms
time-complexity
+
–
0
votes
1
answer
137
Algorithms
Given ‘N’ objects, which are coloured as red, white and blue. Sort these objects so that objects of the same colour are adjacent, with the colours in the order red, white and blue. Design an algorithm with a time com- plexity of O(nlog n)
Given ‘N’ objects, which are coloured as red, white and blue. Sort theseobjects so that objects of the same colour are adjacent, with the coloursin the order red, whi...
Karthi2003
670
views
Karthi2003
asked
Sep 9, 2022
DS
algorithms
sorting
time-complexity
+
–
0
votes
0
answers
138
Time complexity
1. for ( i = 1 ; i <= n ; i++) { for ( j= 1 ; j <= i; j++) { for ( k = 1 ; k <= j ; k++) cout<<"a"; } } Here , complexity = O(n³) 2. for ( i = 1 ; i <= n ; i=i*2) { for ( j = 1 ; j <= i ; j++) cout<< ... = O(n) . But I am getting O(2^n) (A gp was formed , first term = 1 = 2^0 , last term was 2^n so sum is 2^(n+1) which gives complexity as 2^n)
1. for ( i = 1 ; i <= n ; i++){ for ( j= 1 ; j <= i; j++){ for ( k = 1 ; k <= j ; k++) cout<<"a";}} Here , complexity = O(n³) 2.for ( i = 1 ; i <= n ...
Ferox
523
views
Ferox
asked
Sep 8, 2022
Algorithms
algorithms
time-complexity
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
53
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register