Hi everyone,

Does anyone know how to tell if all elements in an array but one are the same. I know how to check if all elements are the same but this other problem has me stumped.

Any ideas would be great


Compare them one by one. Count how many times there is a mismatch. If it's two or less, there's only one different value.