JAVA 1ms using StringBuilder easy to understand
\n\n\n\n\n\n\n\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        StringBuilder sb = new StringBuilder();\n        for(int
\n\n\n\n\n\n\n```\nclass Solution {\n    public boolean canFormArray(int[] arr, int[][] pieces) {\n        StringBuilder sb = new StringBuilder();\n        for(int x : arr){\n\t\t\tsb.append("#");\n            sb.append(x);\n            sb.append("#");\n        }\n        for(int i = 0; i < pieces.length; i++){\n            StringBuilder res = new StringBuilder();\n            for(int j = 0; j < pieces[i].length; j++){\n\t\t\t\tres.append("#");\n                res.append(pieces[i][j]);\n                res.append("#");\n            }\n            if(!sb.toString().contains(res.toString())){\n                return false;\n            }\n        }\n        return true;\n    }\n}\n```\n_Please_ *upvote* _if you like it_
[]