JAVA READABLE CODE || Constant Space
Idea:\n Given word only contains vowels(given in question) and we just have to find out the longest substring that contains all vowels in sorted order of ascii 
**Idea:**\n Given word only contains vowels(given in question) and we just have to find out the longest substring that contains all vowels in sorted order of ascii value. i.e \'a\'<\'e\'<\'i\'<\'o\'<\'u\' .\n So if a substring have 5 unique character and following ascii order we can update our answer by its length.\n**CODE:**\n```\n public int longestBeautifulSubstring(String word) {\n        int cnt=1;\n        int len=1;\n        int max_length=0;\n        \n        int n=word.length();\n        \n        for(int i=1;i<n;i++){\n            if(word.charAt(i)==word.charAt(i-1)){\n                 len++;\n            }else if(word.charAt(i-1)<word.charAt(i)){\n                cnt++;\n                len++;\n            }else{\n                len=1;\n                cnt=1;\n            }\n            \n            if(cnt==5){\n                max_length=Math.max(max_length,len);\n            }\n        }\n        return max_length;\n    }\n```\t\n\n**Complexity:**\n`Time:O(n) and Space:O(1)`\n
['Java']