Accenture Interview Question

Longest substring problem, and array related problem