C# Easy Sliding Window
\npublic class Solution {\n    public int LongestBeautifulSubstring(string word) {\n        \n        var set = new HashSet<char>();\n        int start = 0;    
```\npublic class Solution {\n    public int LongestBeautifulSubstring(string word) {\n        \n        var set = new HashSet<char>();\n        int start = 0;        \n        int max = 0;\n        \n        for(int end = 0; end < word.Length; end++)\n        {\n            if(end > 0 && word[end] < word[end -1])\n            {\n                set.Clear();                \n                start = end;\n            }\n            set.Add(word[end]);             \n            if(set.Count == 5)\n                max = Math.Max(max, end - start + 1);            \n        }\n        return max;\n    }\n}\n```
[]