leet-code/src/main/java/leetcode/editor/cn/LetterCasePermutation.md

24 lines
938 B
Markdown
Raw Normal View History

<p>给定一个字符串<code>S</code>,通过将字符串<code>S</code>中的每个字母转变大小写,我们可以获得一个新的字符串。返回所有可能得到的字符串集合。</p>
<p>&nbsp;</p>
<pre><strong>示例:</strong>
<strong>输入:</strong>S = &quot;a1b2&quot;
<strong>输出:</strong>[&quot;a1b2&quot;, &quot;a1B2&quot;, &quot;A1b2&quot;, &quot;A1B2&quot;]
<strong>输入:</strong>S = &quot;3z4&quot;
<strong>输出:</strong>[&quot;3z4&quot;, &quot;3Z4&quot;]
<strong>输入:</strong>S = &quot;12345&quot;
<strong>输出:</strong>[&quot;12345&quot;]
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>S</code>&nbsp;的长度不超过<code>12</code></li>
<li><code>S</code>&nbsp;仅由数字和字母组成。</li>
</ul>
<div><div>Related Topics</div><div><li>位运算</li><li>字符串</li><li>回溯</li></div></div>\n<div><li>👍 282</li><li>👎 0</li></div>