Find the longest substring that starts with a letter alphabetically smaller than the letter it ends with — in linear time.
Find the longest substring that starts with a letter alphabetically smaller than the letter it ends with — in linear time.
Opens with the full question.