Available question text
Given a binary string s and integer k, find the shortest substring that contains exactly k '1's and return the lexicographically smallest such substring (or empty if none). This can be solved by examining windows spanning k consecutive '1's and choosing the minimum-length window with lexicographic tie-breaking.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2904. Shortest and Lexicographically Smallest Beautiful String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source