You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers across all elements of pieces are also distinct.
Determine whether you can form arr by concatenating the arrays in pieces in any order. You are not allowed to reorder the integers within any individual array pieces[i].
Return true if it is possible to form arr from pieces, otherwise return false.
Constraints:
pieces.length arr.length
sum(pieces[i].length) arr.length
pieces[i].length arr.length
arr[i], pieces[i][j]
The integers in arr are distinct.
The integers in pieces are distinct (i.e., if pieces is flattened into a
You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers across all elements of pieces are also distinct.
Determine whether you can form arr by concatenating the arrays in pieces in any order. You are not allowed to reorder the integers within any individual array pieces[i].
Return true if it is possible to form arr from pieces, otherwise return false.
Constraints:
pieces.length arr.length
sum(pieces[i].length) arr.length
pieces[i].length arr.length
arr[i], pieces[i][j]
The integers in arr are distinct.
The integers in pieces are distinct (i.e., if pieces is flattened into a