Python3 simple solution using two pointer approach
\nclass Solution:\n    def longestBeautifulSubstring(self, s: str) -> int:\n        i,j,x = 0,0,0\n        while j < len(s):\n            if s[j] in [\'a\', \'e
```\nclass Solution:\n    def longestBeautifulSubstring(self, s: str) -> int:\n        i,j,x = 0,0,0\n        while j < len(s):\n            if s[j] in [\'a\', \'e\', \'i\', \'o\', \'u\'] and (s[j-1] <= s[j] or j == 0):\n                j += 1\n            else:\n                if len(set(s[i:j])) == 5:\n                    x = max(x,j-i)\n                i = j\n                j += 1\n        if len(set(s[i:j])) == 5:\n            x = max(x,j-i)\n        return x\n```\n**If you like this solution, please upvote for this**
['Two Pointers', 'Python3']