It is not immediately clear that the task is to return the length of the longest substring, since the longest requirement is mentioned only in the example. One may return the length of the substring that occurs the most (for 'aghtfghkofgh' it is len('gh') = 2).
Not a big deal though.
Created at: 2020/01/17 16:02; Updated at: 2020/02/05 06:23