longestCommonSubsequence = (text1, text2, p1 = 0, p2 = 0, memo = initMemo(text1, text2)) => {
    const isBaseCase = ((p1 === text1.length) || (p2 === text2.length));
    if (isBaseCase) return 0;

    const hasSeen = (memo[p1][p2] !== null);
    if (hasSeen) return memo[p1][p2];

    return dfs(text1, text2, p1, p2, memo);/* Time O((N * M) * M)) | Space O((N * M) + HEIGHT) */
}
DP - Top Down
Matrix - Memoization
Time O(N * (M^2)) | Space O(N * M)
https://leetcode.com/problems/longest-common-subsequence/
@param {string} text1
@param {string} text2
@return {number}