2025-08-24 13:31:22 +0300 MSK
Find the Original Typed String I
Links
Code
class Solution:
def possibleStringCount(self, word: str) -> int:
res, n = 1, len(word)
for i in range(1, n):
cur, prev = word[i], word[i - 1]
if cur == prev:
res += 1
return res