Question DSA-DP-0077
HardWhich technique reduces the memory of the LCS DP from O(mn) to O(min(m, n)) for the length only?
- A.
Using a hash map
- B.
Using recursion
- 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
Which technique reduces the memory of the LCS DP from O(mn) to O(min(m, n)) for the length only?
Using a hash map
Using recursion
Sign up free to see the answer and a step-by-step explanation.
Keeping only the previous row
Sorting the strings