Načítava sa úloha…
Sometimes you need to find not just one character, but a short repeated fragment inside a string. Write a function count_xx that takes a string s and counts how many times the substring xx appears in it. Overlapping matches count too: the string xxx contains two such fragments.
"abcxx"1"xxx"2"xxxx"3def count_xx(s: str) -> int:
Prihláste sa, aby ste videli históriu odoslaní
Prihlásiť saPrihláste sa, aby ste mohli používať AI mentora
Prihlásiť sa"abcxx"1"xxx"2"xxxx"3"abc"0"Hello there"0"xx"1