TikTok Interview Question

Q. Given string, find its longest substring with no repeated characters.