That's cool. Thank you!
I did a python version of it to test it out:
def arrayStringsAreEqual(self, word1: List[str], word2: List[str]) -> bool: w1, i, w1n = 0, 0, len(word1) w2, j, w2n = 0, 0, len(word2) while w1 < w1n and w2 < w2n: if word1[w1][i] != word2[w2][j]: return False if len(word1[w1]) - 1 > i: i += 1 else: w1 += 1 i = 0 if len(word2[w2]) - 1 > j: j += 1 else: w2 += 1 j = 0 return w1 + w2 == w1n + w2n
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's cool. Thank you!
I did a python version of it to test it out: