总和leetcode 39

leetcode17、77

回溯算法可以当作是二叉树的结构进行分析,看在叶节点的位置是什么条件收获结果 每个抛进去的结果都是到叶子节点的路径 以leetcode17为例: 每一层遍历的是每一个号码对应的字符串,当号码全部遍历完成就可以返回结果,所以终止条件是(index==string.length());index是层数,s ......
leetcode 17

c: Dijkstra's Algorithm

DijkstrasAlgorithm.h /** * ***************************************************************************** * @file DijkstrasAlgorithm.h * @brief Dijkstr ......
Algorithm Dijkstra 39

Mac故障排查系列:redis删除key报错MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk.

背景:Mac下使用Another Redis Desktop Manager客户端,删除key,遇到报错:MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. ......
configured currently snapshots to 故障

How to fix TypeScript error: expression of type can't be used to index type All In One

How to fix TypeScript error: expression of type can't be used to index type All In One type guard ......
type TypeScript expression error index

[LeetCode] 2582. Pass the Pillow

There are n people standing in a line labeled from 1 to n. The first person in the line is holding a pillow initially. Every second, the person holdin ......
LeetCode Pillow 2582 Pass the

LeetCode54.螺旋数组

本题关键在于模拟数组螺旋的步骤,使用 flag 二维数组标识矩阵某位置是否被访问过,使用 turn 变量指示当前寻找的方向, turn 为0时,代表向右查找, turn 为1时,代表向下查找, turn 为2时,代表向左查找, turn 为3时,代表向上查找,具体的代码如下: class Solut ......
数组 螺旋 LeetCode 54

算法训练day20 LeetCode654

算法训练day20 LeetCode654.617.700.98 654.最大二叉树 题目 654. 最大二叉树 - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) 使用递归 返回节点地址,输入父节点地址,数组 终止条件是输入地数组为空 单层操作: 如果输入数组 ......
算法 LeetCode day 654 20

vscode运行html文件,显示"windows找不到'chrome'文件"

运行html文件时,弹窗报错。大部分原因是因为chrome浏览器位置不对。这时,我们只要在vscode中修改chrome路径就可以 解决: 1、首先我们右击chrome浏览器找到属性,并且复制目标路径 2、打开vscode,在设置中找到Live server,打开setting.json文件,添加上 ......
文件 quot windows vscode chrome

Nityacke's 分块(代码待补)(未补全)

P2801 教主的魔法 区间加区间查询一个数排名。 对于每个块,维护其有序序列。修改时散块暴力重构,整块打tag。 查询是简单的。时间复杂度 \(O(n\log B+\dfrac{qn}{B}\log B+qB)\)。 \(B=\sqrt{n\log n}\)时复杂度为\(O(n\sqrt{n}\l ......
Nityacke 代码 39

$().click()和$().on('click','要选择的元素',function(){})的区别

$().click()和$().on('click','要选择的元素',function(){})的区别 demiling 于 2018-10-24 10:43:33 发布 7810 收藏 9分类专栏: 每天总结 文章标签: jquery版权 每天总结专栏收录该内容10 篇文章1 订阅订阅专栏$(选 ......
click 39 function 元素 on

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

错误由来 im = im.resize((w, h), Image.ANTIALIAS) Traceback (most recent call last): AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' import ......
39 AttributeError ANTIALIAS attribute module

OGG MA - Not Able To Log InAdmin server ERROR: User name 'oggadmin' or password is incorrect. (Doc ID 2571773.1)

ogg的密码文件可能会损坏需要修复就新建一个新的ogg微服务并且把密码文件考到问问题的地方进行覆盖,我觉得这个是一个bug The recommendation is to Create a dummy MA installation on the same server or different ......

Uncaught TypeError: Cannot read properties of undefined (reading 'form')问题的解决

问题描述 使用vue3执行数据添加操作时,发现了这个错误,使用测试按钮拿文本框数据,一直报错拿不到: 问题解决 原来是vue2在执行这个操作时: 里面放this.form; 而vue3在执行这个操作时, 里面放的却是:form ......

[LeetCode] 1353. Maximum Number of Events That Can Be Attended 最多可以参加的会议数目

You are given an array of events where events[i] = [startDayi, endDayi]. Every event i starts at startDayi and ends at endDayi. You can attend an even ......
数目 LeetCode Attended Maximum 会议

Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl

001、问题 Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl 002、解决方法 (base) [root@pc1 MaSuRCA-4.1.0]# yum -y insta ......
local perl INC usr contains

LeetCode 周赛上分之旅 #47 前后缀分解结合单调栈的贡献问题

⭐️ 本文已收录到 AndroidFamily,技术和职场问题,请关注公众号 [彭旭锐] 和 BaguTree Pro 知识星球提问。 学习数据结构与算法的关键在于掌握问题背后的算法思维框架,你的思考越抽象,它能覆盖的问题域就越广,理解难度也更复杂。在这个专栏里,小彭与你分享每场 LeetCode ......
后缀 LeetCode 贡献 之旅 问题

UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.解决办法

87iuiu由于ii from torchvision import models # 旧版本的写法,将在未来的torchvision 0.15版本中被Deprecated model_old = models.resnet50(pretrained=True) # deprecated model ......

题解 Gym 104077I【[ICPC2022 Xi'an R] Square Grid】

题解 Gym 104077I【[ICPC2022 Xi'an R] Square Grid】 problem 二维棋盘,边界是 \((0,0)\) 到 \((n,n)\)。 对于某个棋子,单次移动可以朝着上下左右四个方向之一移动一格。 对于 \(q\) 个独立的棋子,分别问时间 \(T\) 秒以后: ......
题解 104077I 104077 Square 2022

算法训练day18 LeetCode 513

算法训练day18 LeetCode 513.112.106 513.找树左下角的值 题目 513. 找树左下角的值 - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) 递归方式 单独数据存储最大深度,和此深度的结点值 递归后要注意回溯 class Soluti ......
算法 LeetCode day 513 18

Leetcode刷题21.合并两个有序链表

将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 示例 1: 输入:l1 = [1,2,4], l2 = [1,3,4] 输出:[1,1,2,3,4,4] 示例 2: 输入:l1 = [], l2 = [] 输出:[] 示例 3: 输入:l1 = [] ......
Leetcode 两个 21

L39_用日语表明自己的失误

语料的视频观看地址 概述 用日语表达自己的失误和遗憾时,可以采用:动词て形 + しまいました,しまいました表示对所发生的事情感到后悔和遗憾。比如: 部屋(へや)の番号(ばんごう)を忘(わす)れてしまいました。 我忘记了房间的号码。 动词て形: ~てしまいます ~掉,~完 用法1:(无可挽回的)遗憾 ......
39

算法训练day8 LeetCode 344

算法训练day8: LeetCode 344.541.151.剑指offer05.58. 344.反转字符串 题目 344. 反转字符串 - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) class Solution { public: void revers ......
算法 LeetCode day8 day 344

Uncaught TypeError: Cannot read properties of undefined (reading 'type') from echarts

DON'T use ref or reactive to wrap the echarts instance. Use a common variable or shallowRef to avoid the deep watch for echarts instance. 不要使用 ref 或 r ......

Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001A73833FD00>: Failed to establish a new connection: [WinError 10060]

报错 Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001A73833FD00>: Failed to establ ......

算法训练day17 LeetCode 110

算法训练day17 LeetCode 110.257.404 110平衡二叉树 题目 110. 平衡二叉树 - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) 当子树已经不平衡,直接返回-1.平衡则返回子数高度进行更高树间的高度比较 class Solution ......
算法 LeetCode day 110 17

'main' attribute cannot be used in a module that contains top-level code 问题解决

核心是@main 注解在main.swift 文件中,可以重新命名下 参考资料 https://stackoverflow.com/questions/73431031/swift-cli-app-main-attribute-cannot-be-used-in-a-module-that-cont ......
attribute top-level contains cannot module

算法训练day16 LeetCod 104

算法训练day16 LeetCod 104.111.222 104.二叉树的最大深度 题目 104. 二叉树的最大深度 - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) 递归采用后序的遍历顺序,在根节点处做高度数据的处理 class Solution { pu ......
算法 LeetCod day 104 16

LeetCode3题学透链表初始化、查找、插入删除、逆置操作

1.题目要求 LeetCode203移除链表指定元素 LeetCode707设计链表 LeetCode206反转链表 这三个题目包含了链表的初始化、插入头尾结点、插入删除第n个结点,删除指定内容的结点、链表的逆置等,下面我将一一讲解并展示源代码。 2.具体操作 2.1LeetCode中链表的初始化 ......
LeetCode3 LeetCode

Ubuntu通过certbot手动配置Let's Encrypt SSL泛型域名证书

1. 安装Snap 使用命令安装snap,以及core组件 sudo apt install snapd sudo snap install core sudo snap refresh core 2. 移除旧有的certbot sudo apt-get remove certbot sudo dn ......
手动 证书 Encrypt certbot 域名