leetcode-58 Length of Last Word
来源:互联网 发布:淘宝假物流单号怎么办 编辑:程序博客网 时间:2024/04/19 16:30
不要调用什么split之类的函数(questions like this one is intended to be a practice of detail implementation, not calling other functions)
https://oj.leetcode.com/discuss/9148/my-simple-solution-in-c
我的code,参考了discuss
<span style="font-family:Microsoft YaHei;font-size:14px;">int lengthOfLastWord(char *s) { int count = 0; while(*s){ if(*s++ != ' '){ count++; }else if(*s != '\0' && *s != ' '){ count = 0; } } return count;}</span>
0 0
- [leetcode 58] Length of Last Word
- leetcode-58 Length of Last Word
- Leetcode NO.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, easy] Length of Last Word
- Length of Last Word (leetCode 58)
- leetcode[58]:Length of Last Word
- 【leetcode c++】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(c)
- leetcode 58: Length of Last Word
- leetCode #58 Length of Last Word
- 大数据时代医疗行业爆发 政策壁垒仍是最大障碍
- hdu 1625 Numbering Paths 最短路的变形,使用Floyd 外加判环
- 【wxlua教程三】开始例程
- 栈溢出攻击系列:shellcode在linux x86 64位攻击获得root权限(四)linux下进程内存布局
- Android 3D游戏开发技术详解与典型案例
- leetcode-58 Length of Last Word
- 【饥荒】介绍一些组件
- HDU 1114 Piggy-Bank
- Service 学习一
- 求先序排列 蓝桥杯
- SSIS批量导入excel表
- Javascript with
- linux-Apache 配置
- KMP+枚举 POJ-3080 Blue Jeans