Added an O(N) approach using Map for Length Of Longest Substring.