Answer by Mladen Jablanović for Comparing the order of three arrays with the same elements →
In general, if you have array arr of N such arrays, you can just check if there are any duplicates there:
arr.length == arr.uniq.length
because, for example:
...