1460. Make Two Arrays Equal by Reversing Subarrays
You are given two integer arrays of equal length
target
andarr
. In one step, you can select any non-empty subarray ofarr
and reverse it. You are allowed to make any number of steps.Return
true
if you can makearr
equal totarget
orfalse
otherwise.
1 | class Solution { |