1980. Find Unique Binary String Given an array of strings nums containing n unique binary strings each of length n, return a binary string of length n that does not appear in nums. If there are multiple answers, you may return any of them. 123456789101112131415161718192021222324252627class Solution { int toInt(string& s) { int res = 0; for(int i = s.length() - 1; i >= 0; i--) { if(s[i] == '1') res |= 1<<i; } return res; }public: string findDifferentBinaryString(vector<string>& nums) { unordered_set<int> us; for(auto& n : nums) { us.insert(toInt(n)); } int len = nums[0].length(); for(int i = 0; ; i++) { if(us.count(i)) continue; string res(len, '0'); for(int j = 0; j < len; j++) { if(i & (1<<j)) res[j] = '1'; } return res; } return "-1"; }};