do the comparison you want with words for the array you want
and tell what is the result you want to have at the end.Step by step.
Because it is not easy for me to understand exactly what you want.