from all members: - accepted / - tried
Given a string, please find the longest substring that has no repeated characters.
If there are multiple result, any one substring is fine.
longestUniqueSubstr('aaaaa') // 'a'
longestUniqueSubstr('abcabc') // 'abc', or 'bca', or 'cab'
longestUniqueSubstr('a12#2') // 'a12#'
What is the time & space cost of your solution ? Could you do it better?
Let's try to solve this problem within 15 mintues.