Terminate -1 because you are testing 2 elements at a time