Mark As Completed Discussion

Finally-- if at any time, we encounter a mismatch, we know it's an invalid string.

The time complexity is O(n), as we iterate through all the characters of the string.