I tried using sets but obviously that doesn't work. I need a function to be able to work like this:
let Array1 = [2,2,1,1]
let Array2 = [2,1,2,1]
let Array3 = [2,2,2,1]
I need my function to be able to recognize that Array1
and Array2
are equal without thinking that Array3
is the same. Any thoughts?