【Leetcode_easy】709. To Lower Case
problem
solution1:
class Solution {
public:
string toLowerCase(string str) {
string res = "";
for(auto ch:str)
{
if(ch>='A'&&ch<='Z') ch +=;
res += ch;
}
return res;
}
};
solution2:
class Solution {
public:
string toLowerCase(string str) {
for(auto &ch:str)
{
if(ch>='A'&&ch<='Z') ch +=;
}
return str;
}
};
参考
1. Leetcode_easy_709. To Lower Case;
2. Grandyang;
完
【Leetcode_easy】709. To Lower Case的更多相关文章
- 【Leetcode】709. To Lower Case
To Lower Case Description Implement function ToLowerCase() that has a string parameter str, and retu ...
- 【LeetCode】709. To Lower Case 解题报告(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述: 题目大意 解题方法 ASIIC码操作 日期 题目地址:https:// ...
- Leetcode#709. To Lower Case(转换成小写字母)
题目描述 实现函数 ToLowerCase(),该函数接收一个字符串参数 str,并将该字符串中的大写字母转换成小写字母,之后返回新的字符串. 示例 1: 输入: "Hello" ...
- 709. To Lower Case - LeetCode
Question 709. To Lower Case Sollution 题目大意:字符串大写转小写 思路: 直接调用Java API函数 字符串转char数组,遍历数组,判断如果大写就转小写 Ja ...
- 【Leetcode_easy】784. Letter Case Permutation
problem 784. Letter Case Permutation 参考 1. Leetcode_easy_784. Letter Case Permutation; 2. Grandyang; ...
- LeetCode 709 To Lower Case 解题报告
题目要求 Implement function ToLowerCase() that has a string parameter str, and returns the same string i ...
- 【UML】用例图Use Case diagram(转)
http://blog.csdn.net/sds15732622190/article/details/48858219 前言 总结完UML概述,就该说道UML中的九种图了,这九种图中,最先要说的,就 ...
- 【FPGA】 007 --Verilog中 case,casez,casex的区别
贴一个链接:http://www.cnblogs.com/poiu-elab/archive/2012/11/02/2751323.html Verilog中 case,casez,casex的区别 ...
- 【涨姿势】原来golang的case <-time.After(xxx)还有这样的坑
偶然看到这样一篇文章:<使用 pprof 排查 Golang 内存泄露>https://www.toutiao.com/i6881796351139676680/ 最后一段让我很疑惑: 修 ...
随机推荐
- [TypeScript] vs code TSLint常见错误解决方案
TSLint是一个Typescrip{过滤}t验证工具,用于检测代码. TSLint: comment must start with a space (comment-format) 注释必须从一个 ...
- thymeleaf引入公共css、js
有时候很多css文件是公共的,我们必须要在每个html文件中引入它们,其实我们可以利用Thymeleaf的模板布局,把这些css文件抽出来,同时如果有某个html文件专属的css文件,还可在引入模板的 ...
- js关闭当前页面不弹出提示
window.top.opener=null; window.top.open('','_top');//top当前最顶层窗口.self表示当前打开的窗口 window.top.close(); 作用 ...
- simcom7600ce-t LBS function
Welcome to minicom 2.7 OPTIONS: I18n Compiled on Nov 15 2018, 20:20:38.Port /dev/ttyUSB2, 00:55:23 P ...
- Apache的安装和配置
一.官网下载Apache 官网地址:https://httpd.apache.org/ 点击Download--->点击Files for Microsoft Windows--->点击A ...
- leetcode解题报告(23):Pascal's Triangle
描述 Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, R ...
- Maven项目打包时指定配置策略
以数据库连接池的配置文件(db.properties)为例,一般的项目会有开发用数据库,测试用数据库,正式环境数据库三种配置. 以前的做法是拷贝成三份,注释掉其他了两份 # 开发用 jdbc.url ...
- Codeforces Round #596 (Div. 2, based on Technocup 2020 Elimination Round 2)
A - Forgetting Things 题意:给 \(a,b\) 两个数字的开头数字(1~9),求使得等式 \(a=b-1\) 成立的一组 \(a,b\) ,无解输出-1. 题解:很显然只有 \( ...
- JRebel for IntelliJ激活
好久没用jrebel了,跟前端进行项目联调总是有些许改动,还是热部署方便. 目前用的idea版本:IntelliJ IDEA 2019.2 JRebel插件版本:JRebel for IntelliJ ...
- synchronized是什么,用法及原理
文章转Hollis博客 大家可以关注下,很多技术类型的文章 在再有人问你Java内存模型是什么,就把这篇文章发给他.中我们曾经介绍过,Java语言为了解决并发编程中存在的原子性.可见性和有序性问题,提 ...