[LeetCode]——Longest Substring Without Repeating Characters
来源:互联网 发布:魔法提琴手 知乎 编辑:程序博客网 时间:2024/06/06 07:22
作为模式识别的图像狗,越发觉得毕业找工作还是得coding!
痛定思痛,入了leetcode的深坑!
在提交了无数次以后,Accepted终于向俺招手了~
虽说复杂度高了点,但是作为一个学渣,能看到Accepted这辈子也值了!
class Solution {public: int lengthOfLongestSubstring(string s) { string::size_type n=s.size(); int max=0; for(string::size_type i=0;i!=n;i++) { vector<int> a(256); int temp=0; for(string::size_type j=i;j!=n;j++) { if(a[s[j]]==0) { a[s[j]]++; temp=j-i+1; if(temp>max) max=temp; } else { break; } if(j==n) return temp; } } return max; }};
0 0
- LeetCode —— Longest Substring Without Repeating Characters
- LeetCode——Longest Substring Without Repeating Characters
- LeetCode——Longest Substring Without Repeating Characters
- [LeetCode]——Longest Substring Without Repeating Characters
- leetcode 003 —— Longest Substring Without Repeating Characters
- LeetCode——Longest Substring Without Repeating Characters
- LeetCode题解——3Longest Substring Without Repeating Characters
- Longest Substring Without Repeating Characters —— Leetcode
- LeetCode——Longest Substring Without Repeating Characters
- #3 LeetCode——Longest Substring Without Repeating Characters
- [leetcode Q3] —— Longest Substring Without Repeating Characters
- leetcode——Longest Substring Without Repeating Characters
- leetcode——Longest Substring Without Repeating Characters
- leetcode——3 Longest Substring Without Repeating Characters
- LeetCode——3. Longest Substring Without Repeating Characters
- Leetcode——3. Longest Substring Without Repeating Characters
- LeetCode算法题——Longest Substring Without Repeating Characters
- 3. Longest Substring Without Repeating Characters——LeetCode OJ
- MM模块-控制采购订单中某些项目的输出显示
- Jenkins任务构建后notification形式通知到手机
- 随机梯度下降(Stochastic gradient descent)和 批量梯度下降(Batch gradient descent )的公式对比、实现对比
- Map集合遍历的两种方式图解
- 网络传输,edittext被输入法盖过等一些小问题的解决方法
- [LeetCode]——Longest Substring Without Repeating Characters
- 修改adb devices的设备ID/设备号
- Java中安全终止线程的方法
- PDF免费转换word
- SQL Server 2000表操作内容提要
- matlab中的diag函数
- main函数的两个参数
- 阿里巴巴2015校园招聘求职大礼包
- CentOS,重启的常用命令