I need to check if all the values in X array exist in Y array do something. The order does not matter.
contract test {
uint[] numbers1;
uint[] numbers2;
function push1(uint num1, uint num2, uint num3) public {
numbers1.push(num1);
numbers1.push(num2);
numbers1.push(num3);
}
function push2(uint num1, uint num2, uint num3) public {
numbers2.push(num1);
numbers2.push(num2);
numbers2.push(num3);
}
}
How can I check all numbers in numbers1 exist in numbers2 or not?