✅✔️Easy to understand C++ Solution ✈️✈️✈️✈️✈️
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string shortestBeautifulSubstring(string s, int k) {\n        int n = s.length();\n        int len = n;\n        string ans = "";\n        for(int i=0; i<=n+1; i++) ans += "1";\n        string temp = ans;\n        for(int i=0; i<n; i++){\n            int cnt = 0;\n            for(int j=i; j<n; j++){\n                if(s[j] == \'1\') cnt++;\n                if(cnt == k){\n                    string x = s.substr(i,j-i+1);\n                    if(j-i+1 < len){\n                        ans = x;\n                        len = j-i+1;\n                    }\n                    else if(j-i+1 == len){\n                        ans = min(ans,x);\n                    }\n                    break;\n                }\n            }\n        }\n        if(ans == temp) return "";\n        return ans;\n        \n    }\n};\n```
['String', 'C++']