Find Longest Self-Contained Substring

Find Longest Self-Contained Substring - Coding Problem | K5kC