Adding closest pair & repeated substring.