2
def isLongPressedName(self, name: str, typed: str) -> bool:10
# see if there is any case where both i and j reach to the end, cuz that will be the true condition11
# I only need one True13
return j == len(typed)14
# we iterated through the end of typed, and not yet for name18
# if the characters don't match, return False19
if name[i] != typed[j]:23
# if the two characters match24
# two options, either you move on (dfs(i + 1, j + 1)) or you consider it as an extra character (dfs(i, j + 1))25
# return if any of them is True, which means that i, j reach to the end as aforementioned26
dic[(i, j)] = dfs(i + 1, j + 1) or dfs(i, j + 1)29
# start from index 0, 0