1460. Make Two Arrays Equal by Reversing Subarrays
You are given two integer arrays of equal length
targetandarr. In one step, you can select any non-empty subarray ofarrand reverse it. You are allowed to make any number of steps.Return
trueif you can makearrequal totargetorfalseotherwise.
1 | class Solution { |