📌Fastest Java☕ solution using hashmap
```\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        HashMap hmap = new HashMap<>();\n        for(int piece[]:pieces)\n 
```\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        HashMap<Integer,int[]> hmap = new HashMap<>();\n        for(int piece[]:pieces)\n            hmap.put(piece[0],piece);\n        int i=0;\n        while(i<arr.length)\n        {\n            if(!hmap.containsKey(arr[i]))\n                return false;\n            int list[] = hmap.get(arr[i]);\n            for(int k:list)\n            {\n                if(i>=arr.length || k!=arr[i])\n                    return false;\n                i++;\n            }\n        }\n        return true;\n    }\n}
['Java']