A repeated element will either be the last one in the array or a pair that does not include the last one.