01 · Question
Given strings a and b, return one longest common subsequence. A subsequence preserves order but may skip characters. Return the empty string if none exists; any longest answer is acceptable. Treat characters as Unicode code points, not grapheme clusters.
Example: a="abcde", b="ace" returns "ace".
02 · Analysis
dp[i][j] is the LCS length of suffixes a[i:] and b[j:]. Equal characters can be matched, giving 1+dp[i+1][j+1]; otherwise skip either character and take the larger child. Fill backward from empty suffixes. Reconstruct forward: emit equal characters, otherwise follow a child preserving the optimum. Tie-breaking by advancing i returns one valid optimum. For n,m code points, time and table space are O(nm); reconstruction adds O(n+m) time and O(min(n,m)) output. Go explicitly converts to runes so indices have the same meaning as Python.