python-algorithm
leetcode 1460. Make Two Arrays Equal by Reversing Sub-arrays
무적김두칠
2022. 3. 21. 16:14
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 |
반응형