본문 바로가기
python-algorithm

leetcode 1460. Make Two Arrays Equal by Reversing Sub-arrays

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

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

댓글