Java Solution using Queue
 # Intuition\n<!-- Describe your first thoughts on how to solve this problem.  \n\n\n\n\n\n\n\n\n \n\n\n# Code\n\nclass Solution {\n    public String shortestBe
<!-- # 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 {\n    public String shortestBeautifulSubstring(String s, int k) {\n        int n = s.length(), min = Integer.MAX_VALUE;\n        String mins = new String(s);\n        Queue<Integer> q = new LinkedList<>();\n        for (int i = 0; i < n; i++) {\n            if (s.charAt(i) == \'1\')\n                q.offer(i);\n            if (q.size() == k) {\n                int j = q.poll();\n                int len = i - j + 1;\n                if (len < min) {\n                    min = len;\n                    mins = s.substring(j, i + 1);\n                } else if (min == len) {\n                    if (mins.compareTo(s.substring(j, i + 1)) > 0)\n                        mins = s.substring(j, i + 1);\n                }\n            }\n        }\n        if (min == Integer.MAX_VALUE)\n            return "";\n        return mins;\n    }\n}\n```
['Queue', 'Sliding Window', 'Java']