Simple java code 0 ms beats 100 %
Complexity\n\n# Code\n\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        int[] map = new int[101];\n        for (int i = 
# Complexity\n![image.png](https://assets.leetcode.com/users/images/52e2d4a6-6a3b-404a-a8f8-b018d63750fd_1711028402.6979003.png)\n# Code\n```\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        int[] map = new int[101];\n        for (int i = 0; i < arr.length; i++) {\n            map[arr[i]] = i+1;\n        }\n        for (int[] piece: pieces) {\n            for (int j = 0; j < piece.length; j++) {\n                if (map[piece[j]] == 0 || map[piece[j]] - map[piece[0]] != j) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n}\n```
['Array', 'Hash Table', 'Java']