leetcode 3. Longest Substring Without Repeating Characters
来源:互联网 发布:编程方法学 编辑:程序博客网 时间:2024/06/10 10:43
class Solution {public:int lengthOfLongestSubstring(string s){string now;decltype(now.size()) max = 0;for (auto a : s){if (now.find(a) == string::npos){now += a;}else{if (now.size() > max){max = now.size();}auto index = now.find(a);now.erase(0, index + 1);now += a;}}if (now.size() > max){max = now.size();}return max;}};
0 0
- [LeetCode]3.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] 3.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】3. 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 - 3.Longest Substring Without Repeating Characters
- Leetcode 3. Longest Substring Without Repeating Characters
- 3. Longest Substring Without Repeating Characters LeetCode
- (Leetcode)3. Longest Substring Without Repeating Characters
- leetcode 3. Longest Substring Without Repeating Characters
- LeetCode-3. Longest Substring Without Repeating Characters
- spring---整合Junit,整合web
- caffe-windows(仅cpu)配置过程
- 除夕和春节
- +-字符串
- usaco street race(dfs)
- leetcode 3. Longest Substring Without Repeating Characters
- 删除右键新建多余菜单
- vue-class绑定
- hdu 1599 Common Subsequence(DP)
- 孩子们的游戏(圆圈中最后剩下的数)(约瑟夫环问题)
- linux给用户添加sudo权限
- ios swift 图形的旋转 atan2 函数
- Bash shell 常用快捷键
- python多进程爬取天气信息