Pergunta de entrevista da empresa Verisk

Trapping rainwater problem. Longest substring without duplicates.