X interview question

Longest Substring Without Repeating Characters