1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/找出不同的二进制字符串 [find-unique-binary-string].html
2022-03-29 12:43:11 +08:00

39 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给你一个字符串数组 <code>nums</code> ,该数组由 <code>n</code><strong>互不相同</strong> 的二进制字符串组成,且每个字符串长度都是 <code>n</code> 。请你找出并返回一个长度为&nbsp;<code>n</code>&nbsp;&nbsp;<strong>没有出现</strong><code>nums</code> 中的二进制字符串<em></em>如果存在多种答案,只需返回 <strong>任意一个</strong> 即可。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>nums = ["01","10"]
<strong>输出:</strong>"11"
<strong>解释:</strong>"11" 没有出现在 nums 中。"00" 也是正确答案。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>nums = ["00","01"]
<strong>输出:</strong>"11"
<strong>解释:</strong>"11" 没有出现在 nums 中。"10" 也是正确答案。
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>nums = ["111","011","001"]
<strong>输出:</strong>"101"
<strong>解释:</strong>"101" 没有出现在 nums 中。"000"、"010"、"100"、"110" 也是正确答案。</pre>
<p>&nbsp;</p>
<p><strong>提示:</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><code>'0'</code><code>'1'</code></li>
<li><code>nums</code> 中的所有字符串 <strong>互不相同</strong></li>
</ul>