JAVA | 0 ms
\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        for(int[] p: pieces)  \n\t\t\tif(!contains(arr, p)) \n\t\t\t\treturn f
```\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        for(int[] p: pieces)  \n\t\t\tif(!contains(arr, p)) \n\t\t\t\treturn false;\n        return true;\n    }\n    boolean contains(int[] a, int[] b){\n        int i = 0;\n        int j = 0;\n        while(i < a.length && a[i] != b[j]) i++;\n        while(i < a.length && j < b.length && a[i] == b[j]){\n            i++;\n            j++;\n        }\n        return j == b.length;\n    }\n}\n```
['Java']