LeetCode 709 To Lower Case 解题报告】的更多相关文章

题目要求 Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. 题目分析及思路 题目要求返回一个字符串的小写形式.可以直接使用lower()函数.​如果考虑具体的实现逻辑,则将大写字符转成小写字符即可,判断字符是否处在‘A’~‘Z’之间,如果是的话,就把它转成小写字符. python代码​ class Solution: def toL…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述: 题目大意 解题方法 ASIIC码操作 日期 题目地址:https://leetcode.com/problems/to-lower-case/description/ 题目描述: Implement function ToLowerCase() that has a string parameter str, and returns the same string i…
题目描述 实现函数 ToLowerCase(),该函数接收一个字符串参数 str,并将该字符串中的大写字母转换成小写字母,之后返回新的字符串. 示例 1: 输入: "Hello" 输出: "hello" 示例 2: 输入: "here" 输出: "here" 示例 3: 输入: "LOVELY" 输出: "lovely" 思路 字符串转char数组,遍历数组,判断如果大写就转小写 代码实…
Description Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Input: "Hello" Output: "hello" Example 2: Input: "here" Output: "here" Example 3: In…
题目标签:String 题目让我们把大写字母转换成小写,只要遇到的是大写字母,把它 + 32 变成 小写就可以了. Java Solution: Runtime beats 100.00% 完成日期:07/20/2018 关键词:Ascii code table 关键点:把大写字母 + 32 变成小写 class Solution { public String toLowerCase(String str) { char [] c_arr = str.toCharArray(); for(in…
[LeetCode]375. Guess Number Higher or Lower II 解题报告(Python) 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址: https://leetcode.com/problems/guess-number-higher-or-lower-ii/description/ 题目描述: We are playing the Guess Game. The game is as f…
Question 709. To Lower Case Sollution 题目大意:字符串大写转小写 思路: 直接调用Java API函数 字符串转char数组,遍历数组,判断如果大写就转小写 Java实现: public String toLowerCase(String str) { char[] arr = str.toCharArray(); for (int i = 0; i < arr.length; i++) { if (arr[i] >= 'A' && arr…
[LeetCode]392. Is Subsequence 解题报告(Python) 标签: LeetCode 题目地址:https://leetcode.com/problems/is-subsequence/description/ 题目描述: Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters…
[LeetCode]911. Online Election 解题报告(Python) 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/online-election/description/ 题目描述: In an election, the i-th vote was cast for persons[i] at time times[i]. Now, we…
[LeetCode]722. Remove Comments 解题报告(Python) 标签: LeetCode 题目地址:https://leetcode.com/problems/remove-comments/description/ 题目描述: Given a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the source…