This commit is contained in:
parent
39eb343d8c
commit
1016645340
1 changed files with 8 additions and 0 deletions
8
easy/make_two_arrays_equal_by_reversing_subarrays.py
Normal file
8
easy/make_two_arrays_equal_by_reversing_subarrays.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue