Rakuten Interview Question

A dsa question related to longest substring