Question DSA-DP-0055
MediumWhat is the space-optimised memory needed for the LCS length of strings of lengths m and n?
- A.
O(min(m, n))
- B.
O(1)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Dynamic Programming question
What is the space-optimised memory needed for the LCS length of strings of lengths m and n?
O(min(m, n))
O(1)
Sign up free to see the answer and a step-by-step explanation.
O(mn)
O(m + n) only with recursion