0

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

Thanks

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by WaltP
0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.