brute force | c++ | unordered_map
\n    bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) {\n            \n        unordered_map<int,vector<int>> m;\n        \n        for(int i=0
```\n    bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) {\n            \n        unordered_map<int,vector<int>> m;\n        \n        for(int i=0;i<pieces.size();i++)\n        {\n            m[pieces[i][0]] = pieces[i];\n        }\n        \n        for(int i=0;i<arr.size();)\n        {\n            if(m.find(arr[i])==m.end())\n                return false;\n            \n            vector<int> temp = m[arr[i]];\n            \n            for(int j=0;j<temp.size();j++,i++)\n            {\n                if(arr[i]!=temp[j])\n                    return false;\n            }\n        }\n        \n        return true;\n    }\n```
[]