본문 바로가기
python-algorithm

leetcode 2124. Check if All A's Appears Before All B's

by 무적김두칠 2022. 3. 21.

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
반응형

댓글