1980. Find Unique Binary String Medium
1/**
2 * [1980] Find Unique Binary String
3 *
4 * 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.
5 *
6 * Example 1:
7 *
8 * Input: nums = ["01","10"]
9 * Output: "11"
10 * Explanation: "11" does not appear in nums. "00" would also be correct.
11 *
12 * Example 2:
13 *
14 * Input: nums = ["00","01"]
15 * Output: "11"
16 * Explanation: "11" does not appear in nums. "10" would also be correct.
17 *
18 * Example 3:
19 *
20 * Input: nums = ["111","011","001"]
21 * Output: "101"
22 * Explanation: "101" does not appear in nums. "000", "010", "100", and "110" would also be correct.
23 *
24 *
25 * Constraints:
26 *
27 * n == nums.length
28 * 1 <= n <= 16
29 * nums[i].length == n
30 * nums[i] is either '0' or '1'.
31 * All the strings of nums are unique.
32 *
33 */
34pub struct Solution {}
35
36// problem: https://leetcode.com/problems/find-unique-binary-string/
37// discuss: https://leetcode.com/problems/find-unique-binary-string/discuss/?currentPage=1&orderBy=most_votes&query=
38
39// submission codes start here
40
41impl Solution {
42 pub fn find_different_binary_string(nums: Vec<String>) -> String {
43 String::new()
44 }
45}
46
47// submission codes end
48
49#[cfg(test)]
50mod tests {
51 use super::*;
52
53 #[test]
54 fn test_1980() {
55 }
56}
57
Back
© 2025 bowen.ge All Rights Reserved.