Skip to content

Practice Find Unique Binary String

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Medium#1980
LeetCode Problem

Find Unique Binary String

Problem Statement

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.

Source: Find Unique Binary String on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
nums = ["01","10"]
Output
"11"

# Example 2

Input
nums = ["00","01"]
Output
"11"

# Example 3

Input
nums = ["111","011","001"]
Output
"101"

Constraints

n == nums.length
1 <= n <= 16
nums[i].length == n
nums[i] is either '0' or '1'.
All the strings of nums are unique.

Related LeetCode Problems

Practice more problems similar to Find Unique Binary String.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.