leetcode 58. Length of Last Word
来源:互联网 发布:君子知怕读后感 编辑:程序博客网 时间:2024/05/18 21:08
class Solution {public: int lengthOfLastWord(string s) { int be = s.length()-1,end = s.length()-1; for(;end >= 0;){ if(s[end] != ' ') break; end--; } for(be = end;be >= 0;be--){ if(s[be] == ' ') break; } return end - be; }};
0 0
- 58. Length of Last Word Leetcode Python
- [LeetCode]58.Length of Last Word
- LeetCode --- 58. Length of Last Word
- [Leetcode] 58. Length of Last Word
- [leetcode] 58.Length of Last Word
- LeetCode - 58. Length of Last Word
- <LeetCode OJ> 58. Length of Last Word
- 58. Length of Last Word LeetCode
- 【LeetCode】58. Length of Last Word
- leetcode 58. Length of Last Word
- LeetCode *** 58. Length of Last Word
- LeetCode 58. Length of Last Word
- leetcode-58. Length of Last Word
- LeetCode-58.Length of Last Word
- [leetcode] 58. Length of Last Word
- LeetCode 58. Length of Last Word
- Leetcode-58. Length of Last Word
- leetcode-java-58. Length of Last Word
- 提交注册信息到数据库中
- JSP和Servlet原理剖析
- C/C++练习5
- 基于cache的过载问题解决模式
- 设计师分析需求的时候需要避免的4个误区详解
- leetcode 58. Length of Last Word
- linux结束进程
- JavaScript - RegExp(正则表达式)
- JAVA中Set集合
- PullToRefresh使用详解(一)--构建下拉刷新的listView
- AVL - 自平衡二叉树 - 详解
- Android开发使用的常见第三方框架汇总
- Fragment中处理触摸事件
- 乱序字符串的问题