[Python3] Simple single pass
Explanation:\ng holds the unique vowels seen so far, in order.\ncount holds the size of the current substring.\nm holds the max size, and is what we return at t
**Explanation:**\n`g` holds the unique vowels seen so far, in order.\n`count` holds the size of the current substring.\n`m` holds the max size, and is what we return at the end.\n\nWe do one pass through `word`, and if we encounter a vowel, we do one of two things:\n1. If `g` isn\'t empty and `g[-1]` is greater than the new vowel, then we do a reset - we set `count` back to 0 and empty out `g`.\n2. If `g` is blank or `g[-1]` is smaller than the new vowel, then we simply append the new vowel to `g`.\n\nWe do this every iteration, as well:\n1. `count += 1` obviously.\n2. We check if `g == \'aeiou\'`. If this is true, then we have a valid substring of size `count`. We compare it with `m`, naturally.\n\nAt the end, we spit out `m`, which is our correct answer.\n\n**Code:**\n```\nclass Solution:\n    def longestBeautifulSubstring(self, word: str) -> int:\n        g = \'\'\n        count = m = 0\n        for x in word:\n            if g and x < g[-1]:\n                count = 0\n                g = \'\'\n            if not g or x > g[-1]:\n                g += x\n            count += 1\n            if g == \'aeiou\':\n                m = max(m, count)\n        return m\n```
['Python']