Dyno Nobel Interview Question

write a function to check if two arrays have the same elements