Any hint for Minimum Longest Substring problem of march long challenge

Anyone please give an hint how to solve this

You can refer to the editorial: MINSUB - Editorial