Easy Solution using sliding window and set!  Beats 100%
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        set<string> tmp;\n        int n = s.size();\n        int l = 0, r = 0;\n        int c = 0, mn = n;\n        \n        for(int r=0; r<n; r++){\n            if(s[r] == \'1\') c++;\n            while(l <= r && c == k ){\n                if((r-l+1) < mn){\n                    mn = r-l+1;\n                    tmp = {s.substr(l, (r-l+1))};\n                }else if((r-l+1) == mn){\n                    tmp.insert(s.substr(l, r-l+1));\n                }\n\n                if(s[l++] == \'1\') c--;\n            }\n        }\n\n       if(tmp.size() == 0) return "";\n       return *tmp.begin(); \n        \n    }\n};\n```
['C++']