Home »
MCQs »
Algorithms MCQs
What is the auxiliary space complexity of the space-optimized bottom-up approach for LCS?
37. What is the auxiliary space complexity of the space-optimized bottom-up approach for LCS?
- O(m * n)
- O(n)
- O(1)
- O(m)
Answer
The correct answer is: B) O(n)
Explanation
The space-optimized approach uses two arrays of size n, where n is the length of one of the strings.