题目简介:
给定一个字符串 s ,通过将字符串 s 中的每个字母转变大小写,我们可以获得一个新的字符串。
返回 所有可能得到的字符串集合 。以 任意顺序 返回输出。
示例 1:
1 | 输入:s = "a1b2" |
示例 2:
1 | 输入: s = "3z4" |
提示:
1 <= s.length <= 12s由小写英文字母、大写英文字母和数字组成
思路:
回溯,遇到字母时进行变换状态,当遍历到字符串结尾时将其加入res中。
代码如下:
1 | class Solution { |
给定一个字符串 s ,通过将字符串 s 中的每个字母转变大小写,我们可以获得一个新的字符串。
返回 所有可能得到的字符串集合 。以 任意顺序 返回输出。
示例 1:
1 | 输入:s = "a1b2" |
示例 2:
1 | 输入: s = "3z4" |
提示:
1 <= s.length <= 12s 由小写英文字母、大写英文字母和数字组成回溯,遇到字母时进行变换状态,当遍历到字符串结尾时将其加入res中。
1 | class Solution { |
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: true
tags: true