Update longest substring without duplicates