Added Longest Repeated Substring function