There was an error while loading. Please reload this page.
1 parent a3f0cde commit 24cb699Copy full SHA for 24cb699
Nov-5-24.py
@@ -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