cpp half implementation of Longest Substring Without Repeating Chars