solution for longest string without repeating char