Back to problems

Vowel-Wrapped Substring Middle Reverse

Algorithm · Capital One · Medium

Requirements Input consists of one string, s. Whenever a contiguous segment has length at least 2 and begins and ends with vowels (a, e, i, o, or u, without regard to case), reverse the characters strictly inside those boundary characters in place. Produce the transformed string. As stated, the prompt does not say whether this operation should cover all qualifying segments, only the largest segments, or just the outermost pair; applying it to every possible segment would…

Checking your access…