09 2021 档案
摘要:题目链接:https://leetcode-cn.com/problems/interval-list-intersections/ 题目描述: 题解: class Solution { public: vector<vector<int>> intervalIntersection(vector<
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/backspace-string-compare 题目描述: 给定 S 和 T 两个字符串,当它们分别被输入到空白的文本编辑器后,判断二者是否相等,并返回结果。 # 代表退格字符。 注意:如果对空文本输入退格字符,文本继续为
阅读全文
摘要:**题目链接:**https://leetcode-cn.com/problems/split-linked-list-in-parts 题目描述: 给你一个头结点为 head 的单链表和一个整数 k ,请你设计一个算法将链表分隔为 k 个连续的部分。 每部分的长度应该尽可能的相等:任意两部分的长度
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/number-of-longest-increasing-subsequence/ 题目描述: 题解: 题解链接:https://leetcode-cn.com/problems/number-of-longest-incr
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/roman-to-integer/ 题目描述: 题解: class Solution { public: int romanToInt(string s) { unordered_map<char, int> umap; u
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/number-of-boomerangs 题目描述: 给定平面上 n 对 互不相同 的点 points ,其中 points[i] = [xi, yi] 。回旋镖 是由点 (i, j, k) 表示的元组 ,其中 i 和 j
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/longest-valid-parentheses/ 题目描述: 给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。 题解: class Solution { public: int
阅读全文
摘要:##修改系统启动模式 1.获取当前模式。systemctl get-default。 如图所示,本机的启动模式为命令行模式。 2.查看centos的启动模式。vi /etc/inittab。 centos中存在两种启动模式: multi-user.target: analogous to runle
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/ 题目描述: 题解: 非状态机的DP讲解题解 class Solution { public: int maxProfit(vect
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/compare-version-numbers/ 题目描述: 给你两个版本号 version1 和 version2 ,请你比较它们。 版本号由一个或多个修订号组成,各修订号由一个 '.' 连接。每个修订号由 多位数字 组成
阅读全文