Finished algorithm for determining where same-direction runs exist.