摘要: # 简介 RT # 命令 ``` sudo npm cache clean -f sudo npm install -g n sudo n stable ``` # 参考链接 https://askubuntu.com/questions/426750/how-can-i-update-my-nod 阅读全文
posted @ 2023-07-06 21:35 HDU李少帅 阅读(20) 评论(1) 推荐(0) 编辑
摘要: RT https://leetcode.cn/problems/replace-employee-id-with-the-unique-identifier/solution/ select b.unique_id, a.name from Employees a left join Employe 阅读全文
posted @ 2023-04-22 09:22 HDU李少帅 阅读(78) 评论(0) 推荐(0) 编辑
摘要: leetcode 2619 遇到了 ?? 语法糖,简而言之 可选链功能 就是防止抛出异常 caught TypeError: Cannot read properties of undefined (reading 'salary') at <anonymous>:1:12 const user = 阅读全文
posted @ 2023-04-18 23:28 HDU李少帅 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 简介 二分查找经常搞不清楚边界问题,直接记录模板 code public class Solution extends VersionControl { public int firstBadVersion(int n) { int low = 1; int high = n; int mid; w 阅读全文
posted @ 2022-11-13 20:22 HDU李少帅 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 简介 最近 无聊看了一下 数值解法 已知 $\frac{dy}{dx} = y$ 我们知道其有一个解析解为 $y = e^x$ 同时我们知道 其初值 $y(0) = 1$, x 的范围为 $0<= x <= 1$ 我们需要求解其数值解,也就是$y$ 值在 $0<= x <= 1$ 的分布 我们猜想显 阅读全文
posted @ 2022-11-13 10:46 HDU李少帅 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 名词解释 git clean -f 清除untract file HEAD 表示当前版本 HEAD^ 表示上一个版本 HEAD^^ 上上一个版本 HEAD~100 上100个版本 git reset --hard HEAD^ 丢弃当前版本返回上一个版本 --soft 是将修改放回本地退回到commi 阅读全文
posted @ 2022-11-13 10:27 HDU李少帅 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 简介 简单题 code class Solution { public Integer count = 0; public void dfs(StringBuffer time, int [] aws, int rlt, int maxNumber){ if(rlt >= maxNumber) re 阅读全文
posted @ 2022-11-05 09:46 HDU李少帅 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 简介 如何寻求一个数组中的出现次数最多的书 虽然最开始想到了这个方法但是不知道如何去表达,grep就利用了这个算法 class Solution { public int majorityElement(int[] nums) { Integer candidate = null; int coun 阅读全文
posted @ 2022-11-04 23:01 HDU李少帅 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 简介 杨辉三角 是一道简单题,可以通过类似一层推下一层的方式进行计算,但是好像看过一个题解, 采用的方式是组合数。本来想采用组合数,尝试了double溢出 尝试了long 溢出,尝试了BigDecimal leetcode 不识别,无奈之下尝试使用数组的方式并进行延迟计算的方式; code clas 阅读全文
posted @ 2022-11-03 23:19 HDU李少帅 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 简介 如何写一个自己的注解?? 参考链接 https://www.cnblogs.com/satire/p/15066808.html 阅读全文
posted @ 2022-10-31 23:17 HDU李少帅 阅读(11) 评论(0) 推荐(0) 编辑