Python3 Intuitive solution by hash map
\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        dic = {}\n        for piece in pieces:\n            dic
```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        dic = {}\n        for piece in pieces:\n            dic[piece[0]] = piece\n        idx = 0\n        while idx < len(arr):\n            key = arr[idx]\n            if key in dic:\n                if arr[idx: idx + len(dic[key])] == dic[key]:\n                    idx += len(dic[key])\n                else:\n                    return False\n            else:\n                return False\n        return True\n```
['Python', 'Python3']