Skip to content

Commit 24cb699

Browse files
committed
2914
1 parent a3f0cde commit 24cb699

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Nov-5-24.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution:
2+
def minChanges(self, s: str) -> int:
3+
ans = 0
4+
i,j = 0,1
5+
while j<len(s):
6+
if s[i]!=s[j]:
7+
ans += 1
8+
i+=2
9+
j+=2
10+
return ans

0 commit comments

Comments
 (0)