# Amazon Online Assessment (OA) - Longest String Made Up Of Only Vowels

Given a string of lower characters, remove at most two substrings of any length from the given string such that the remaining string contains vowels('a','e','i','o','u') only.

Your aim is to maximize the length of the remaining string. Output the length of the remaining string after removal of at most two substrings.

**NOTE: The answer may be 0, i.e. removing the entire string.**

### Examples

#### Example 1:

##### Input:`earthproblem`

##### Output: `2`

#### Example 2:

##### Input:`letsgosomewhere`

##### Output: `3`

## Try it yourself

Loading full content...