leetcode validate binary nodes
node版本管理工具推荐
hello,今天给大家分享几款 node 版本管理的工具。 背景 在开发前端项目的时候,特别是新到公司接手一个多年维护的老项目时,如果 node 版本不正确,有的插件可能无法正确安装,比如我之前提到的 node-sass 无法安装问题,具体请看:https://www.cnblogs.com/eas ......
【LeetCode 2701. 连续递增交易】MySQL用户变量编程得到严格递增连续子序列的开始位置,结束位置,长度等统计信息
题目地址 https://leetcode.cn/problems/consecutive-transactions-with-increasing-amounts/ 代码 # Write your MySQL query statement below with t1 as( select * # ......
【Leetcode 2474. 购买量严格增加的客户】MySQL用户变量编程解决严格递增连续子序列问题
题目地址 https://leetcode.cn/problems/customers-with-strictly-increasing-purchases/description/ 代码 # Write your MySQL query statement below with t1 as( se ......
【LeetCode 2494. 合并在同一个大厅重叠的活动】MySQL用户变量编程解决区间合并问题
题目地址 https://leetcode.cn/problems/merge-overlapping-events-in-the-same-hall/ 代码 # Write your MySQL query statement below with t2 as( select * # 只需要改动这 ......
【LeetCode1747. 应该被禁止的 Leetflex 账户】MySQL用户变量编程;尝试维护一个multiset
题目地址 https://leetcode.cn/problems/leetflex-banned-accounts/description/ 代码 with t1 as( select account_id,ip_address, login as tick, "login" as mytype ......
【Leetcode1949. 坚定的友谊】使用MySQL在无向图中寻找{"CompleteTripartite", {1, 1, 3}}这个pattern
题目地址 https://leetcode.cn/problems/strong-friendship/ 思路 就是在无向图中寻找这个pattern: (* Mathematica *) GraphData[{"CompleteTripartite", {1, 1, 3}}] SQL写还是比较麻烦。 ......
【LeetCode 2142. 每辆车的乘客人数 I】乘客到站等车,车到站载客。MySQL用户变量编程完成
题目地址 https://leetcode.cn/problems/the-number-of-passengers-in-each-bus-i/description/ 思路 将所有关键时刻作为tick。(同一时刻车和人同时到,默认人在车前到) 之后按照tick升序,使用MySQL用户变量编程完成 ......
【LeetCode 】练习str_to_date函数;over(rows between CURRENT ROW AND 2 following)实现【当月和接下来2个月】滑动窗口
题目地址 https://leetcode.cn/problems/hopper-company-queries-iii/description/ 代码 -- CTE生成2020年每月的最后一天 WITH RECURSIVE months AS ( SELECT LAST_DAY('2019-12- ......
leetcode 15.三数之和
leetcode 15.三数之和 第十五题:三数之和 1.排序 + 双指针: 和两数之和不同,但可以转化为类似的思路,即确定一个数,去找数组中是否有另外两个数之和等于它的相反数。本题的难点在于如何去除重复解,如果是无序数组,则需要对每个值所在的位置进行记录并进行比较。但如果是有序数组且相加结果为0, ......
[LeetCode] 2085. Count Common Words With One Occurrence
Given two string arrays words1 and words2, return the number of strings that appear exactly once in each of the two arrays. Example 1: Input: words1 = ......
【LeetCode 1635. Hopper 公司查询 I】with recursive生成2020年每月的最后一天
题目地址 https://leetcode.cn/problems/hopper-company-queries-i/description/ 代码 -- CTE生成2020年每月的最后一天 WITH RECURSIVE months AS ( SELECT LAST_DAY('2019-12-01 ......
【LeetCode 2854. 滚动平均步数】MySQL过去n日滑动窗口
题目地址 https://leetcode.cn/problems/rolling-average-steps/description/ 代码 WITH t1 AS ( SELECT user_id, steps_date, CASE WHEN COUNT(steps_count) OVER ( P ......
【LeetCode 2989. 班级表现】T-SQL 动态sql编程示例
题目地址 https://leetcode.cn/problems/class-performance/description/ 题目大意 编写一个查询,计算学生获得的 最高分 和 最低分 之间的 总分差(3 次作业的总和)。 代码 /* Write your T-SQL query stateme ......
【LeetCode 2994. 发生在周五的交易 II】with recursive生成2023-11月所有周五的日期
题目地址 https://leetcode.cn/problems/friday-purchases-ii/description/ 代码 # Write your MySQL query statement below WITH RECURSIVE Fridays (week_of_month, ......
【LeetCode2993. 发生在周五的交易 I】MySQL里尝试实现weekofmonth功能
题目地址 https://leetcode.cn/problems/friday-purchases-i/description/ 代码 # Write your MySQL query statement below with t1 as( SELECT *, DAYOFMONTH(purchas ......
node.js 安装与环境变量配置
一、安装node.js 官网:下载地址 历史版本:历史版本下载地址 下载完毕后,可以安装node,一路默认选项即可。这里我的安装路径是:D:\environment\nodejs。 建议不要安装在系统盘(如C:),建议安装的路径不要有中文。 二、设置nodejs prefix(全局)和cache(缓 ......
node版本过高产生的启动不起来
今天在用开源框架时发现的vue是使用的vue2,而自己的Node.js又过高 ,出现如图报错: 那么该如何解决这个问题呢? 其实很简单 在目录中找到找到package.json 加入这样一段代码就行了 "serve": "set NODE_OPTIONS=\"--openssl-legacy-pro ......
[LeetCode] 1363. Largest Multiple of Three 形成三的最大倍数
Given an array of digits digits, return the largest multiple of three that can be formed by concatenating some of the given digits in any order. If th ......
k8s集群Node节点管理:节点信息查看及节点label标签管理
k8s集群Node节点管理:节点信息查看及节点label标签管理 Kubernetes集群Node管理 一、查看集群信息 [root@k8s-master1 ~]# kubectl cluster-info Kubernetes control plane is running at https:/ ......
node 快速搭建http服务器
1.新建目录demo然后在当前目录下打开cmd窗口执行npm init 一直回车,执行结束该目录下出现一个package.json 2.node环境自行安装,需要依赖如下 * npm add express * npm add nodemon * npm install -g axios --reg ......
CentOs安装Nvm,Node
Centos7系统 镜像链接如下: https://mirrors.aliyun.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Everything-2009.iso?spm=a2c6h.25603864.0.0.18de6aeaLWNeIw 1: ......
grep提示"Binary file (standard input) matches"
一、问题现象 [root@test ~]# cat 2e44fc3e1551879f86112ff36ef7671b313a7d0d7ad52ff8b5b080e850e10f50-json.log-20240110 |grep '2024-01-10' Binary file (standard ......
day 1 LeetCode刷题日志
今天的内容是 704 和 27 ovo 704. 二分查找 给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target 写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1 Myself C: //左闭右闭 [0,1,2,3] int searc ......
Kubernetes Multi-Master Node Cluster
https://medium.com/@lubomir-tobek/kubernetes-multi-master-node-cluster-f2081e504983 Lubomir Tobek · Follow 10 min read · Dec 14, 2023 2 Creating and o ......
leetcode 11.盛最多水的容器
leetcode 11.盛最多水的容器 第十一题:盛最多水的容器 1.暴力枚举: 会超时,但是做一些条件判断应该可以擦边过 public int maxArea(int[] height) { int max_result = 0; for (int i = 0;i<height.length-1; ......
[Node.js]安装 pnpm
官方的文档:https://www.pnpm.cn/installation 我电脑是先安装 cnpm ,再使用 cnpm 安装 pnpm : cnpm install -g pnpm 安装的很快,然后查看已安装版本: pnpm -v 8.14.0 ......
[LeetCode] 2696. Minimum String Length After Removing Substrings
You are given a string s consisting only of uppercase English letters. You can apply some operations to this string where, in one operation, you can r ......
LeetCode 872
Leaf-Similar Trees Leaf-Similar Trees - LeetCode Thinkings 二叉树无论先中后序遍历,所得叶子节点次序不变. Codes 我采用了非递归的中序遍历方式: /** * Definition for a binary tree node. * st ......
多个子项目共用根级node_modules
方法一:mklink /d <项目路径>\node_modules <公共node_modules路径> 1、首先以管理员身份运行 [cmd](命令提示符) js 复制代码 mklink /d <项目路径>\node_modules <公共node_modules路径> 2、比如: js 复制代码 ......