Answers for "find if one array is subarray of another"

PHP
4

check if array values exists in another array

$result = !empty(array_intersect($people, $criminals));
Posted by: Guest on April-02-2020
0

javascript check if array is subset of another

let superSet = ['B', 'C', 'A', 'D'];
let subSet = ['D', 'C'];
let mixedSet = new Set([...superSet, ...subSet]);
let isSubset = mixedSet.size == superSet.length
Posted by: Guest on January-18-2021

Code answers related to "find if one array is subarray of another"

Browse Popular Code Answers by Language