python-algorithm
leetcode 2124. Check if All A's Appears Before All B's
무적김두칠
2022. 3. 21. 16:24
1
2
3
4
5
6
|
class Solution:
def checkString(self, s: str) -> bool:
compare=[]
for i in s: compare.append(i)
if compare == sorted(compare) :return True
else : return False
|
cs |
반응형