8 lines
257 B
Python
8 lines
257 B
Python
# https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays
|
|
from typing import List
|
|
|
|
class Solution:
|
|
def canBeEqual(self, target: List[int], arr: List[int]) -> bool:
|
|
target.sort()
|
|
arr.sort()
|
|
return target == arr
|