241 views

1 Answer

Related questions

2.2k
views
1 answers
0 votes
Jaspreet Kaur Bains asked Dec 19, 2017
2,211 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
597
views
1 answers
0 votes
Geet asked Nov 29, 2016
597 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.
235
views
1 answers
1 votes
jenilS7 asked Mar 18
235 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.
308
views
1 answers
0 votes
vivek1211 asked Oct 2, 2023
308 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