
LeetCode
yu_1992_11_25
每天进步一点点
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 3. 无重复字符的最长子串
LeetCode 第三题 无重复字符的最长子串 难度中等 给定一个字符串 s ,请你找出其中不含有重复字符的 最长子串 的长度。 示例 1: 输入: s = “abcabcbb” 输出: 3 解释: 因为无重复字符的最长子串是 “abc”,所以其长度为 3。 示例 2: 输入: s = “bbbbb” 输出: 1 解释: 因为无重复字符的最长子串是 “b”,所以其长度为 1。 示例 3: 输入: s = “pwwkew” 输出: 3 解释: 因为无重复字符的最长子串是 “wke”,所以其长度为 3。 请注意原创 2021-11-30 14:59:57 · 253 阅读 · 0 评论 -
LeetCode 4Sum C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Given an array S of原创 2017-08-05 23:46:02 · 634 阅读 · 0 评论 -
LeetCode Letter Combinations of a Phone Number C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Given a digit s原创 2017-08-05 13:54:24 · 761 阅读 · 0 评论 -
LeetCode 3Sum C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Given an array原创 2017-08-04 00:08:32 · 567 阅读 · 0 评论 -
LeetCode Merge Two Sorted Lists C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Merge two原创 2017-08-10 13:18:00 · 400 阅读 · 0 评论 -
LeetCode 3Sum Closest C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Given原创 2017-08-02 20:42:27 · 521 阅读 · 0 评论 -
LeetCode Container With Most Water C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Given原创 2017-08-02 15:42:54 · 300 阅读 · 0 评论 -
LeetCode Remove Nth Node From End of List C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: Given a li原创 2017-08-09 13:29:07 · 462 阅读 · 0 评论 -
LeetCode Longest Substring Without Repeating Characters C++
#include <iostream> #include<string> #include <map> using namespace std; /* Problom: Given a string, find the length of the longest substring without repeating characters. Example原创 2017-08-02 08:51:34 · 344 阅读 · 0 评论 -
LeetCode Reverse Integer C++
class Solution { public: int reverse(int x) { #if 0 //可以用这部分简洁的、 int ans = 0, lo = INT_MIN / 10, hi = INT_MAX / 10; while (x) { if (ans < lo || ans > hi)原创 2017-08-01 15:51:27 · 381 阅读 · 0 评论 -
LeetCode Two sum c++
问题:https://leetcode.com/problems/two-sum/description/#include <iostream> #include <vector> #include<algorithm> using namespace std;/*********************************************************************原创 2017-08-01 12:26:13 · 410 阅读 · 0 评论 -
LeetCode Add Two Numbers C++
#include <iostream> #include <vector> #include<algorithm> #include <queue> using namespace std;/************************************************************************/ /* Problem: You ar原创 2017-08-07 17:45:26 · 421 阅读 · 0 评论