time complexity of lcs is
Answers
Answered by
0
Answer:
Time complexity of the above naive recursive approach is O(2^n) in worst case and worst case happens when all characters of X and Y mismatch i.e., length of LCS is 0. In the above partial recursion tree, lcs(“AXY”, “AYZ”) is being solved twice.
Similar questions
Math,
1 month ago
Social Sciences,
1 month ago
Math,
2 months ago
Biology,
2 months ago
Math,
10 months ago