Company: AT and T
Difficulty: medium
\n Binary String Transformation Validato \n \n \n Given a binary string binary consisting of characters \'0\' and \'1\' only, perform the following 0 or more times: \n \n Choose any subsequence, sort the subsequence, and replace the original subsequence with the sorted sequence. \n \n \n Next, there is an array of strings, arr , of length n , where each string has length |binary| and consists of characters \'0\', \'1\' and \'?\'. Each \'?\' character can be replaced with either \'0\' or \'1\' arbitrarily. For each string in arr , after replacing each \'?\' character with either \'0\' or \'1\', determine if it is possible to rearrange binary using the operation described any number of times. If it is possible, store \"YES\" as the corresponding answer, otherwise store \"NO\", both without quotes. \n \n \n Note: \n \n A string a is a subsequence of a string b obtained by deletion of some number (possibly, zero or all) of characters without changing the order of the remaining characters.