#1980
Find Unique Binary String
pupil · 445 · lc medium +26 · failed · 79.4% accepted · 2,562 likes · top 91%
Description
You are given n unique binary strings, each of length n, stored in the array nums. Construct and return any binary string of length n that is absent from nums.
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.
Code
1
2
3