会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
张宵
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
22
下一页
2021年10月3日
找到字符串中所有的字母异位词
摘要: 题目链接:https://leetcode-cn.com/problems/find-all-anagrams-in-a-string 题目描述: 给定两个字符串 s 和 p,找到 s 中所有 p 的 异位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。 异位词 指字母相同,但排列不同的字
阅读全文
posted @ 2021-10-03 18:48 张宵
阅读(54)
评论(0)
推荐(0)
2021年9月30日
区间列表的交集
摘要: 题目链接:https://leetcode-cn.com/problems/interval-list-intersections/ 题目描述: 题解: class Solution { public: vector<vector<int>> intervalIntersection(vector<
阅读全文
posted @ 2021-09-30 10:07 张宵
阅读(48)
评论(0)
推荐(0)
2021年9月29日
比较含退格的字符串
摘要: 题目链接:https://leetcode-cn.com/problems/backspace-string-compare 题目描述: 给定 S 和 T 两个字符串,当它们分别被输入到空白的文本编辑器后,判断二者是否相等,并返回结果。 # 代表退格字符。 注意:如果对空文本输入退格字符,文本继续为
阅读全文
posted @ 2021-09-29 10:40 张宵
阅读(51)
评论(0)
推荐(0)
2021年9月22日
分割链表
摘要: **题目链接:**https://leetcode-cn.com/problems/split-linked-list-in-parts 题目描述: 给你一个头结点为 head 的单链表和一个整数 k ,请你设计一个算法将链表分隔为 k 个连续的部分。 每部分的长度应该尽可能的相等:任意两部分的长度
阅读全文
posted @ 2021-09-22 10:39 张宵
阅读(36)
评论(0)
推荐(0)
2021年9月21日
最长递增子序列的个数
摘要: 题目链接:https://leetcode-cn.com/problems/number-of-longest-increasing-subsequence/ 题目描述: 题解: 题解链接:https://leetcode-cn.com/problems/number-of-longest-incr
阅读全文
posted @ 2021-09-21 16:16 张宵
阅读(81)
评论(0)
推荐(0)
2021年9月18日
罗马数字转整数
摘要: 题目链接:https://leetcode-cn.com/problems/roman-to-integer/ 题目描述: 题解: class Solution { public: int romanToInt(string s) { unordered_map<char, int> umap; u
阅读全文
posted @ 2021-09-18 11:04 张宵
阅读(20)
评论(0)
推荐(0)
2021年9月13日
回旋镖的数量
摘要: 题目链接:https://leetcode-cn.com/problems/number-of-boomerangs 题目描述: 给定平面上 n 对 互不相同 的点 points ,其中 points[i] = [xi, yi] 。回旋镖 是由点 (i, j, k) 表示的元组 ,其中 i 和 j
阅读全文
posted @ 2021-09-13 16:51 张宵
阅读(44)
评论(0)
推荐(0)
2021年9月3日
最长有效括号
摘要: 题目链接:https://leetcode-cn.com/problems/longest-valid-parentheses/ 题目描述: 给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。 题解: class Solution { public: int
阅读全文
posted @ 2021-09-03 14:23 张宵
阅读(29)
评论(0)
推荐(0)
2021年9月2日
CentOS7图形模式与命令行模式的切换
摘要: ##修改系统启动模式 1.获取当前模式。systemctl get-default。 如图所示,本机的启动模式为命令行模式。 2.查看centos的启动模式。vi /etc/inittab。 centos中存在两种启动模式: multi-user.target: analogous to runle
阅读全文
posted @ 2021-09-02 17:04 张宵
阅读(2186)
评论(0)
推荐(0)
最佳买卖股票时机含冷冻期
摘要: 题目链接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/ 题目描述: 题解: 非状态机的DP讲解题解 class Solution { public: int maxProfit(vect
阅读全文
posted @ 2021-09-02 15:31 张宵
阅读(46)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
22
下一页
公告