Transform Binary String Using Subsequence Sort
Sorting any chosen subsequence only moves zeros left. A pattern is reachable when some filling of its question marks keeps the zeros of the candidate ahead of the original at every prefix.
Sorting any chosen subsequence only moves zeros left. A pattern is reachable when some filling of its question marks keeps the zeros of the candidate ahead of the original at every prefix.