<p>Given an array of strings <code>nums</code> containing <code>n</code> <strong>unique</strong> binary strings each of length <code>n</code>, return <em>a binary string of length </em><code>n</code><em> that <strong>does not appear</strong> in </em><code>nums</code><em>. If there are multiple answers, you may return <strong>any</strong> of them</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> nums = [&quot;01&quot;,&quot;10&quot;]
<strong>Output:</strong> &quot;11&quot;
<strong>Explanation:</strong> &quot;11&quot; does not appear in nums. &quot;00&quot; would also be correct.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> nums = [&quot;00&quot;,&quot;01&quot;]
<strong>Output:</strong> &quot;11&quot;
<strong>Explanation:</strong> &quot;11&quot; does not appear in nums. &quot;10&quot; would also be correct.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre>
<strong>Input:</strong> nums = [&quot;111&quot;,&quot;011&quot;,&quot;001&quot;]
<strong>Output:</strong> &quot;101&quot;
<strong>Explanation:</strong> &quot;101&quot; does not appear in nums. &quot;000&quot;, &quot;010&quot;, &quot;100&quot;, and &quot;110&quot; would also be correct.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>n == nums.length</code></li>
	<li><code>1 &lt;= n &lt;= 16</code></li>
	<li><code>nums[i].length == n</code></li>
	<li><code>nums[i] </code>is either <code>&#39;0&#39;</code> or <code>&#39;1&#39;</code>.</li>
	<li>All the strings of <code>nums</code> are <strong>unique</strong>.</li>
</ul>


'''
Example 1:

Input: nums = ["01","10"]
Output: "11"
Explanation: "11" does not appear in nums. "00" would also be correct.
Example 2:

Input: nums = ["00","01"]
Output: "11"
Explanation: "11" does not appear in nums. "10" would also be correct.
Example 3:

Input: nums = ["111","011","001"]
Output: "101"
Explanation: "101" does not appear in nums. "000", "010", "100", and "110" would also be correct.

["111","011","001"]
 
  [    001,    011,              111]

   000,    010,    100, 101, 110,
   
[0000000000000]
   
count the len of each num, 

["0000","0011","0001","1000"]<-set 

check to see if the all subset is in set,


subset[00]--> [10] 


[00,10]-->[01,11] 
  i  i

subset[000]--> [100] 
        i
[000, 100]->[010,110]
[000, 100,010,110]
   i
[000, 100,010,110]-->[001, 101,011,111]

generate subset:
    take len(nums[0]) ->len
    generate a seed of [[0 of size len]]
    
    use bfs, 
    
    iterate from i to n:
        for item in  curr seed_subset:
             change curr_subset[i] to 1
            
'''

class Solution:
    def findDifferentBinaryString(self, nums: List[str]) -> str:
        str_len  = len(nums[0]) # 2
        
        nums = set(nums)
        
        subsets = [["0" for _ in range(str_len)]]
        # [[0,0]]-->[[0,0],[1,0]]-->[[0,1],[1,1]], [[0,0],[1,0],[0,1],[1,1]]
        #   i
        #   j
        #   1
        for i in range(str_len):
            size = len(subsets)
            for j in range(size):
                new_subset = subsets[j][:]
                new_subset[i] = "1"
                subsets.append(new_subset)
                
        for item in subsets:
            curr_str = ''.join(item)
            if curr_str not in nums:
                return curr_str

        return ""
        

'''
nums = ["01","10"]

'''      
        

720