239 views

1 Answer

Related questions

2.2k
views
1 answers
0 votes
Jaspreet Kaur Bains asked Dec 19, 2017
2,209 views
Which recurrence relation satisfy the sequence: 2, 3, 4, . . ., for n ≥ 1.A ) T(N) = 2 T(N-1) - T(N-2) B)T(N) = T(N-1) + T(N-2)C)T(N) = N+1D)None of these
595
views
1 answers
0 votes
Geet asked Nov 29, 2016
595 views
Find a recurrence relation for the number of ternary strings of length n that do not contain two consecutive 0s or two consecutive 1s.Find the same for binary strings.Also write the initial conditions.
230
views
1 answers
1 votes
jenilS7 asked Mar 18
230 views
What is the returned value by the given function below.Algo fun(n){ If(x<=2) return 1; Else { Return fun(n1/2) + ... }}Note : Assume that all the syntax and data type constraints are valid and just check algorithm.
306
views
1 answers
0 votes
vivek1211 asked Oct 2, 2023
306 views
T(n) = T(n^1/2) + ndoing this in substitution method gives the ans as O(n)but using tree recursion gives the ans as O(nlogn)which of these are correct and which has to be considered for worst case