Sponsored
Use these hints if you're stuck. Try solving on your own first.
Generate all substrings in O(N^2) time with hashing.
Choose those hashing of strings with the largest length.
Solve with full IDE support and test cases