[Python] Simple O(n) solution based on the hints
\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        for i, piece in enumerate(pieces):\n            for j,n
```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        for i, piece in enumerate(pieces):\n            for j,num in enumerate(piece):\n                try: pieces[i][j] = arr.index(num)\n                except: return False\n        \n        pieces.sort()\n        \n        return [i for i in range(len(arr))] == [x for piece in pieces for x in piece]\n\t\t## or use list(chain(*[piece for piece in pieces]))\n```\n![image](https://assets.leetcode.com/users/images/6d50d7cc-7b40-4251-8196-b1b7a347c39f_1609524504.188131.png)\n\n\nNote: All the following steps are based on the assumption of all the numbers being distinct.\n* Step 1: for each number in each piece of the pieces, ***try*** to locate its **index** in the target array. If failed, then return ***False***\n* Step 2: ***sort*** the **index** pieces\n* Step 3: ***chain*** the sorted **index** pieces (I used list comprehensions, but you can use chain) to see if it matches the target **index** list, which is [0, 1, 2, ..., len(arr)-1]\n\n# Happy New Year!
['Python', 'Python3']