accepted solution for Longest Substr without repeats