Unit SS, Part A: PAT, Algorithm: Longest repetition searching