上一页 1 2 3 4 5 6 7 8 ··· 22 下一页
摘要: 题目链接:https://leetcode-cn.com/problems/find-all-anagrams-in-a-string 题目描述: 给定两个字符串 s 和 p,找到 s 中所有 p 的 异位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。 异位词 指字母相同,但排列不同的字 阅读全文
posted @ 2021-10-03 18:48 张宵 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode-cn.com/problems/interval-list-intersections/ 题目描述: 题解: class Solution { public: vector<vector<int>> intervalIntersection(vector< 阅读全文
posted @ 2021-09-30 10:07 张宵 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode-cn.com/problems/backspace-string-compare 题目描述: 给定 S 和 T 两个字符串,当它们分别被输入到空白的文本编辑器后,判断二者是否相等,并返回结果。 # 代表退格字符。 注意:如果对空文本输入退格字符,文本继续为 阅读全文
posted @ 2021-09-29 10:40 张宵 阅读(44) 评论(0) 推荐(0) 编辑
摘要: **题目链接:**https://leetcode-cn.com/problems/split-linked-list-in-parts 题目描述: 给你一个头结点为 head 的单链表和一个整数 k ,请你设计一个算法将链表分隔为 k 个连续的部分。 每部分的长度应该尽可能的相等:任意两部分的长度 阅读全文
posted @ 2021-09-22 10:39 张宵 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 题目链接: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 张宵 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 题目链接: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 张宵 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 题目链接: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 张宵 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode-cn.com/problems/longest-valid-parentheses/ 题目描述: 给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。 题解: class Solution { public: int 阅读全文
posted @ 2021-09-03 14:23 张宵 阅读(21) 评论(0) 推荐(0) 编辑
摘要: ##修改系统启动模式 1.获取当前模式。systemctl get-default。 如图所示,本机的启动模式为命令行模式。 2.查看centos的启动模式。vi /etc/inittab。 centos中存在两种启动模式: multi-user.target: analogous to runle 阅读全文
posted @ 2021-09-02 17:04 张宵 阅读(2119) 评论(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 张宵 阅读(35) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页