Sail E0 Webinar
Question
What is the time complexity of the above dynamic programming implementation of the longest common subsequence problem where length of one string is "m and the length of the other string is "n?
Options:
A .  O(n)
B .  O(m)
C .  O(m + n)
D .  O(mn)
Answer: Option D


The time complexity of the above dynamic programming implementation of the longest common subsequence is O(mn).



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers