上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: webpack 安装(默认最新) -g全局 npm install webpack -g 检查版本: webpack -v 构建vue项目: 先安装vue-cli: npm install vue-cli 利用vue-cli脚手架工具初始化webpack项目 vue init webpack mya 阅读全文
posted @ 2021-12-09 16:44 秋月桐 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 基本并查集建立 并查集是一种合并不相交集合的数据结构 ,常用在寻找图中是否存在环路 建立并查集就是在建立一个尽量平衡的树。边建立边检测是否存在环路 最重要的两点: 找到根节点 find_root(x) 合并两棵树 union(xTree,yTree) #include <stdc++.h> usin 阅读全文
posted @ 2021-12-02 21:34 秋月桐 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 路径规划07 1575. 统计所有可行路径 今天又是一道hard呢,加油干碎它,干碎这道题就进入进阶部分了 先从记忆化搜索开始(因为普通dfs会超时) 普通dfs步骤: 1.递归函数的入参和出参确定 2.递归出口 Base Case 3.编写最小单元的逻辑 通常Base Case 是最难的部分 cl 阅读全文
posted @ 2021-11-30 10:23 秋月桐 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 路径规划06 1289. 下降路径最小和 II 本题和上一题没有太大区别,就是注意用两个变量保存上一行的dp最小值和次小值 #include <cstring> class Solution { public: int minFallingPathSum(vector<vector<int>>& g 阅读全文
posted @ 2021-11-28 22:01 秋月桐 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 路径规划05 931. 下降路径最小和 class Solution { public: int minFallingPathSum(vector<vector<int>>& matrix) { int m=matrix.size(); int n=matrix[0].size(); //先假设从第 阅读全文
posted @ 2021-11-27 23:01 秋月桐 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 路径规划04 三角形动态规划 class Solution { public: int minimumTotal(vector<vector<int>>& triangle) { int dp[200][200]; memset(dp,0,sizeof(dp)); //状态转移方程:dp[i][j] 阅读全文
posted @ 2021-11-25 20:26 秋月桐 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 路径规划03 在前两个题基础上问题换成了求最小路径和 64. 最小路径和 class Solution { public: int minPathSum(vector<vector<int>>& grid) { //状态转移方程 //dp[i][j]=min(dp[i-1][j],dp[i][j-1 阅读全文
posted @ 2021-11-25 20:25 秋月桐 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 路径规划02 在路径规划01中加一个障碍物 63. 不同路径 II class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int m=obstacleGrid.size() 阅读全文
posted @ 2021-11-25 20:24 秋月桐 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 动态规划之路径规划01 前言:虽然自己做过几个动态规划的题目,看过题解后也能做出几个二维的路径问题,主要是对dfs进行优化。但是还是有点知其然不知其所以然的感觉,有两个月左右没做dp,现在让我写对一个二维路径dp都困难。所以开这个专题系统学习dp。 感谢:宫水三叶 本笔记根据三叶大佬的刷题日记进行学 阅读全文
posted @ 2021-11-25 20:22 秋月桐 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 按时间抽选的fft算法golang实现 参考博客:https://zhuanlan.zhihu.com/p/135259438 实现目的:参考以上链接博客c语言的按时间抽选的fft算法进行学习,用golang进行重构简化代码并且完成实现功能。 代码: package main import ( "f 阅读全文
posted @ 2021-11-03 14:04 秋月桐 阅读(219) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页