Python 5 lines - hashmap
\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        mp = {x[0]: x for x in pieces}\n        res = []\n     
```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        mp = {x[0]: x for x in pieces}\n        res = []\n        \n        for num in arr:\n            res += mp.get(num, [])\n            \n        return res == arr\n```
[]