Serenity

热爱可抵岁月漫长

一个热爱技术、喜欢折腾的开发者。 专注于前端开发,偶尔写写后端。 记录生活,分享技术,探索未知。

点击任意处进入哦~
加载中
输入关键词开始搜索
leetcode88. 合并两个有序数组

leetcode88. 合并两个有序数组

暂无摘要...

leetcode
归并排序 简单
2月 Serenity
leetcode86. 分隔链表

leetcode86. 分隔链表

暂无摘要...

leetcode
链表
2月 Serenity
leetcode84. 柱状图中最大的矩形

leetcode84. 柱状图中最大的矩形

分析对于一个高度,如果能得到向左和向右的边界那么就能对每个高度求一次面积遍历所有高度,即可得出最大面积使用单调栈,在出栈操作时得到前后边界并计算面积class Solution {public: int largestRectangleArea(vector<int>& h

acwing
单调队列 困难
2月 Serenity
leetcode83. 删除排序链表中的重复元素

leetcode83. 删除排序链表中的重复元素

暂无摘要...

leetcode
链表
2月 Serenity
leetcode82. 删除排序链表中的重复元素 II

leetcode82. 删除排序链表中的重复元素 II

暂无摘要...

leetcode
链表
2月 Serenity
leetcode81. 搜索旋转排序数组 II

leetcode81. 搜索旋转排序数组 II

暂无摘要...

leetcode
二分 中等
2月 Serenity
leetcode80. 删除有序数组中的重复项 II

leetcode80. 删除有序数组中的重复项 II

分析用快慢两个指针对数组本身进行覆盖,由于数组有序,如果慢指针-2如果还与fast指针相同说明此时重复元素一定超过2个了,跳过快指针即可class Solution {public: int removeDuplicates(vector<int>& nums) {

leetcode
中等
2月 Serenity
leetcode79. 单词搜索

leetcode79. 单词搜索

分析对每个位置进行dfs遍历,每次dfs搜索时向四个方向拓展,如果超出边界或者已经访问过则放弃这个位置,其他情况再次进行dfs遍历,一直到与单词完全匹配时返回true;typedef pair<int ,int > PII;class Solution {public: int d

leetcode
dfs 中等
2月 Serenity
leetcode78. 子集

leetcode78. 子集

分析优秀题解链接class Solution {public: vector<vector<int>> ans; vector<int>path; void dfs(int u,vector<int>& nums){

leetcode
dfs 中等
2月 Serenity
leetcode77. 组合

leetcode77. 组合

class Solution {public: vector<vector<int>>ans; vector<int>path; void dfs(int u,int n,int k){ if(path.size()+n-u+1&l

leetcode
dfs 中等
2月 Serenity