package leetcode;

/**
 * https://leetcode.com/problems/make-two-arrays-equal-by-reversing-sub-arrays/
 */
public class Problem1460 {
    public boolean canBeEqual(int[] target, int[] arr) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem1460 prob = new Problem1460();
        System.out.println(prob.canBeEqual(new int[]{1,2,3,4}, new int[]{2,4,1,3})); // true
        System.out.println(prob.canBeEqual(new int[]{7}, new int[]{7})); // true
        System.out.println(prob.canBeEqual(new int[]{1,12}, new int[]{12,1})); // true
        System.out.println(prob.canBeEqual(new int[]{3,7,9}, new int[]{3,7,11})); // false
        System.out.println(prob.canBeEqual(new int[]{1,1,1,1,1}, new int[]{1,1,1,1,1})); // true
    }
}

@@ -12,16 +12,42 @@
 tcode;%0A%0A
+import java.util.Arrays;%0A%0A
 /**%0A * h
@@ -222,584 +222,97 @@
     
-// TODO%0A        return false;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem1460 prob = new Problem1460();%0A        System.out.println(prob.canBeEqual(new int%5B%5D%7B1,2,3,4%7D, new int%5B%5D%7B2,4,1,3%7D)); // true%0A        System.out.println(prob.canBeEqual(new int%5B%5D%7B7%7D, new int%5B%5D%7B7%7D)); // true%0A        System.out.println(prob.canBeEqual(new int%5B%5D%7B1,12%7D, new int%5B%5D%7B12,1%7D)); // true%0A        System.out.println(prob.canBeEqual(new int%5B%5D%7B3,7,9%7D, new int%5B%5D%7B3,7,11%7D)); // false%0A        System.out.println(prob.canBeEqual(new int%5B%5D%7B1,1,1,1,1%7D, new int%5B%5D%7B1,1,1,1,1%7D)); // true
+Arrays.sort(target);%0A        Arrays.sort(arr);%0A        return Arrays.equals(target, arr);
 %0A   

Solve problem 1460