Create LongestSubstring.cpp

An interesting implementation of the problem