首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
leetcode917
】的更多相关文章
[Swift]LeetCode917. 仅仅反转字母 | Reverse Only Letters
Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions. Example 1: Input: "ab-cd" Output: "dc-ba" Example 2: Input: "a-bC…
leetcode917
class Solution { public: string reverseOnlyLetters(string S) { int len = S.length(); queue<char> Q; stack<char> ST; vector<int> V; ; i < len; i++) { char c = S[i]; //小写 ASCII[97,122] //大写 ASCII[65,90] && c <= ) || (c >=…
Leetcode917.Reverse Only Letters仅仅反转字母
给定一个字符串 S,返回 "反转后的" 字符串,其中不是字母的字符都保留在原地,而所有字母的位置发生反转. 示例 1: 输入:"ab-cd" 输出:"dc-ba" 示例 2: 输入:"a-bC-dEf-ghIj" 输出:"j-Ih-gfE-dCba" 示例 3: 输入:"Test1ng-Leet=code-Q!" 输出:"Qedo1ct-eeLg=ntse-T!" 提…