Serenity

热爱可抵岁月漫长

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

点击任意处进入哦~
加载中
输入关键词开始搜索
acwing902. 最短编辑距离

acwing902. 最短编辑距离

暂无摘要...

acwing
dp
2月 Serenity
acwing897. 最长公共子序列

acwing897. 最长公共子序列

暂无摘要...

acwing
dp
2月 Serenity
leetcode53. 最大子数组和

leetcode53. 最大子数组和

分析用f[i]来表示数组中第i个位置的最大数组和,那么计算f[i]的时候就需要从f[i-1]转移过来,转移方程为f[i]=max(f[i-1]+nums[i],nums[i]),由于只与f[i]和f[i-1]有关,可以用pre来表示i-1,ans来表示i。class Solution {public

acwing
dp 简单
2月 Serenity
leetcode51. N 皇后

leetcode51. N 皇后

class Solution { char g[10][10]; bool col[20],dg[20],udg[20]; vector<vector<string>> res;//保存答案 vector<string> str;//用于保

leetcode
dfs 困难
2月 Serenity
acwing896. 最长上升子序列 II

acwing896. 最长上升子序列 II

暂无摘要...

acwing
二分
2月 Serenity
acwing895. 最长上升子序列

acwing895. 最长上升子序列

暂无摘要...

acwing
dp
2月 Serenity
leetcode50. Pow(x, n)

leetcode50. Pow(x, n)

分析使用快速幂做法class Solution {public: double myPow(double x, int n) { double ans=1.0; if(x==0)return 0.0; long b=n; if(b&lt

leetcode
数学 中等
2月 Serenity
acwing875. 快速幂

acwing875. 快速幂

暂无摘要...

acwing
数学
2月 Serenity
leetcode49. 字母异位词分组

leetcode49. 字母异位词分组

分析string排序后的值相同的,可以使用字符串哈希将对应的字符串加进vector中,最后遍历哈希表,得到答案class Solution {public: vector<vector<string>> groupAnagrams(vector<string&gt

leetcode
字符串 中等 哈希
2月 Serenity
acwing898. 数字三角形

acwing898. 数字三角形

暂无摘要...

acwing
dp
2月 Serenity