Intel Corporation Interview Question

find the longest substring without duplicate chats in a string