Microsoft interview question

Check if the two given arrays have the same elements