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 |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 977. Squares of a Sorted Array (0) | 2022.03.22 |
---|---|
leetcode 1207. Unique Number of Occurrences (0) | 2022.03.22 |
leetcode 1460. Make Two Arrays Equal by Reversing Sub-arrays (0) | 2022.03.21 |
leetcode 2032. Two Out of Three (0) | 2022.03.21 |
leetcode 1880. Check if Word Equals Summation of Two Words (0) | 2022.03.21 |
댓글