-
This is an online algorithm taking constant extra space. The idea is to count at each point if the prefix or the suffix reaches the threshold of N ratio. When such a threshold is reached, we cut the corresponding substring and keep it only if it the longest seen yet. Fixes #2217.
12963427