Question 11
What is the space complexity of computing the LENGTH of the Longest Common Subsequence of two strings of lengths m and n using space optimization?
Computing only the length requires only the current row and the previous row of the DP table. By allocating the array for the smaller string, space is O(min(m, n)).