Python3 hashmap-based solution - Check Array Formation Though Concatenation
\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        d = {p[0]: p for p in pieces}\n        i = 0\n        w
```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        d = {p[0]: p for p in pieces}\n        i = 0\n        while i < len(arr):\n            if arr[i] not in d or len(arr) - i < len(d[arr[i]]) or arr[i: i+len(d[arr[i]])] != d[arr[i]]:\n                return False\n            i += len(d[arr[i]])\n        return True \n```
['Python', 'Python3']