Add Longest substring algorithm with test