What goes in the blank?
// longest common subsequence table dp[i][j] = a[i - 1] === b[j - 1] ? dp[i - 1][j - 1] + 1 : Math.____(dp[i - 1][j], dp[i][j - 1]);
Answer: max
When the characters differ, the best subsequence drops one of them, so take the larger neighbour.
Play Problem Solving ▸