1
2
3
4
5
6
7
|
class Solution:
def canBeEqual(self, target: List[int], arr: List[int]) -> bool:
target.sort()
arr.sort()
if target==arr : return True
else : return False
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 1207. Unique Number of Occurrences (0) | 2022.03.22 |
---|---|
leetcode 2124. Check if All A's Appears Before All B's (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 |
leetcode 2053. Kth Distinct String in an Array (0) | 2022.03.21 |
댓글