leetcode 45 ii

ashx部署到iis访问不了

#####公司的老项目部署到IIS报一堆错误: #####一、Noesis.Javascript报错,忘记截图了,这是因为这个组件是32位的,iis必须开启32位 ![](https://img2023.cnblogs.com/blog/1151397/202309/1151397-20230905 ......
ashx iis

IIS报错:HTTP 错误 500.21 – Internal Server Error,如何解决

这一段时候,换了个新电脑,重新配置好IIS后,发现部署IIS上面的网站运行不了 问题描述:HTTP 错误 500.21 – Internal Server Error 处理程序“ExtensionlessUrlHandler-Integrated-4.0”在其模块列表中有一个错误模块“Managed ......
Internal 错误 500.21 Server Error

LeetCode -- 394. 字符串解码(栈处理字符串问题)

我们用栈同时维护当前字符串和倍数以及要加倍的字符串 当遇到"["时,我们保存当前字符串,即将当前字符 cres 串入栈; 当遇到"]"时,res = cres + 倍数 * 应加倍的字符串 class Solution: def decodeString(self, s: str) -> str: ......
字符串 字符 LeetCode 问题 394

IIS DateTime出现中文导致解析错误

#####背景:本地测试没问题,部署到IIS后DateTime报错 #####原因:DateTime出现中文 #####解决: ######尝试1:按照网上资料更改系统区域时间格式 -> 无效 ######尝试2:按照网上资料修改代码 -> 不现实 ######尝试3: ######1.ctrl+r ......
DateTime 错误 IIS

《看了受制了》第十天,5道题,合计45道

# 2023年9月5日 ## 牛客周赛10 游游的最长稳定数组 ### 题目理解 就是模拟,只要符合要求长度加一,不符合就归1然后重新计数 ### 代码实现 ```c++ #include #include using namespace std; const int N = 100000 + 10 ......

【Leetcode刷题记录】1、汇总区间;2、合并区间;3、插入区间

1、汇总区间 题目:给定一个 无重复元素 的 有序 整数数组 nums 。 返回 恰好覆盖数组中所有数字 的 最小有序 区间范围列表 。也就是说,nums 的每个元素都恰好被某个区间范围所覆盖,并且不存在属于某个范围但不属于 nums 的数字 x 。 列表中的每个区间范围 [a,b] 应该按如下格式 ......
区间 Leetcode

力扣——9 [回文数](https://leetcode.cn/problems/two-sum/)

给你一个整数 `x` ,如果 `x` 是一个回文整数,返回 `true` ;否则,返回 `false` 。 回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。 - 例如,`121` 是回文,而 `123` 不是。 **示例 1:** ``` 输入:x = 121 输出:true ``` ......
回文 leetcode problems two-sum https

[LeetCode] 2433. Find The Original Array of Prefix Xor

You are given an integer array pref of size n. Find and return the array arr of size n that satisfies: pref[i] = arr[0] ^ arr[1] ^ ... ^ arr[i]. Note ......
LeetCode Original Prefix Array 2433

[Leetcode Weekly Contest]361

title: '[Leetcode Weekly Contest]361' date: 2023-08-21 15:18:48 tags: [OJ] mathjax: true 链接:[LeetCode](https://leetcode-cn.com/contest/weekly-contest- ......
Leetcode Contest Weekly 361

虚拟机部署gitlab 接口502 含泪做笔记 ==> /var/log/gitlab/nginx/gitlab_error.log <== 2023/09/04 16:45:44 [crit] 42817#0: *2 connect() to unix://var/opt/gitlab/gitlab-rails/sockets/gitlab.socket failed

**行不通勿喷,谢谢!!** **虚拟机部署gitlab 接口502 ** **gitlab-ctl tail** 查看具体报错信息: ``` ==> /var/log/gitlab/nginx/gitlab_error.log /var/log/gitlab/gitlab-workhorse/cu ......
gitlab gitlab_error gitlab-rails var log

LeetCode952三部曲之三:再次优化(122ms -> 96ms,超51% -> 超91%)

### 欢迎访问我的GitHub > 这里分类和汇总了欣宸的全部原创(含配套源码):[https://github.com/zq2599/blog_demos](https://github.com/zq2599/blog_demos) ### 本篇概览 - 本文是《LeetCode952三部曲之三 ......
三部曲 LeetCode 再次 ms 952

leetcode199二叉树的右视图

前序遍历:中左右(先遍历左子树);中右左(先遍历右子树) 中序遍历:左中右; 后序遍历:左右中; 本题递归: vector<int>v;//记录最先遍历到的右子树 void dfs(TreeNode* root,int depth){ if(!root)return ; if(v.size()==d ......
视图 leetcode 199

【Leetcode刷题记录】1、最多可以摧毁的敌人城堡数目;2、消灭怪物的最大数量;3、序列化和反序列化二叉搜索树

1、最多可以摧毁的敌人城堡数目 题目:给你一个长度为 n ,下标从 0 开始的整数数组 forts ,表示一些城堡。forts[i] 可以是 -1 ,0 或者 1 ,其中: -1 表示第 i 个位置 没有 城堡。 0 表示第 i 个位置有一个 敌人 的城堡。 1 表示第 i 个位置有一个你控制的城堡 ......
序列 数目 城堡 怪物 Leetcode

Windows IIS提示80端口被占用

**在使用IIS 部署网站中提示“无法启动此网站。其他网站可能存在同一端口。”** 报错截图如下: ![](https://img2023.cnblogs.com/blog/1737810/202309/1737810-20230904141234393-960381010.png) ``` net ......
端口 Windows IIS

LeetCode 周赛上分之旅 #43 计算机科学本质上是数学吗?

> ⭐️ **本文已收录到 AndroidFamily,技术和职场问题,请关注公众号 \[彭旭锐] 和 [BaguTree Pro](https://www.mdnice.com/writing/85b28c4e60354865a423728e668fc570) 知识星球提问。** > > 学习数据 ......
LeetCode 本质 之旅 数学 计算机

力扣——1 [两数之和](https://leetcode.cn/problems/two-sum/)

给定一个整数数组 `nums` 和一个整数目标值 `target`,请你在该数组中找出 **和为目标值** *`target`* 的那 **两个** 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。 你可以按任意顺序返回答案。 **示例 ......
之和 leetcode problems two-sum https

【Leetcode刷题记录】四种买卖股票问题

前言:买卖股票问题大多数都是用动态规划解决,关键在于手上是否有股票,据此来找状态转移方程 1、买卖股票的最佳时机 题目:给定一个数组 prices ,它的第 i 个元素 prices[i] 表示一支给定股票第 i 天的价格。 你只能选择 某一天 买入这只股票,并选择在 未来的某一个不同的日子 卖出该 ......
Leetcode 股票 问题

240. 搜索二维矩阵 II

编写一个高效的算法来搜索 m x n 矩阵 matrix 中的一个目标值 target 。该矩阵具有以下特性: 每行的元素从左到右升序排列。 每列的元素从上到下升序排列。 ![](https://img2023.cnblogs.com/blog/2773231/202309/2773231-2023 ......
矩阵 240 II

刷题[Leetcode]3. 无重复字符的最长子串

3. 无重复字符的最长子串 class Solution { public: int lengthOfLongestSubstring(string s) { if (s.size() == 0) return 0; unordered_set<int> unset; int maxLen = 0; ......
字符 Leetcode

代码随想录算法训练营第二十九天| 491.递增子序列 46.全排列 47.全排列 II

491.递增子序列 卡哥建议:本题和大家刚做过的 90.子集II 非常像,但又很不一样,很容易掉坑里。 https://programmercarl.com/0491.%E9%80%92%E5%A2%9E%E5%AD%90%E5%BA%8F%E5%88%97.html 视频讲解:https://ww ......
随想录 训练营 九天 序列 随想

LeetCode952三部曲之二:小幅度优化(137ms -> 122ms,超39% -> 超51%)

### 欢迎访问我的GitHub > 这里分类和汇总了欣宸的全部原创(含配套源码):[https://github.com/zq2599/blog_demos](https://github.com/zq2599/blog_demos) ### 本篇概览 - 本文是《LeetCode952三部曲》系 ......
三部曲 幅度 LeetCode ms 952

leetcode139 单词拆分

下面采用穷举的方法。但是超时。 注意:题目示例中看起来输出是字符串‘true’or'false'。但是实际输出是bool类型,所以在下面程序中进行了转换。 class Solution: def __init__(self): self.ans='false' def wordBreak(self, ......
单词 leetcode 139

leetcode226 翻转二叉树——简单

# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self. ......
leetcode 226

跳跃游戏 II

给定一个长度为 n 的 0 索引整数数组 nums。初始位置为 nums[0]。 每个元素 nums[i] 表示从索引 i 向前跳转的最大长度。换句话说,如果你在 nums[i] 处,你可以跳转到任意 nums[i + j] 处: 0 <= j <= nums[i] i + j < n 返回到达 n ......
II

代码随想录算法训练营第二十八天| 93.复原IP地址 78.子集 90.子集II

93.复原IP地址 卡哥建议:本期本来是很有难度的,不过 大家做完 分割回文串 之后,本题就容易很多了 题目链接/文章讲解:https://programmercarl.com/0093.%E5%A4%8D%E5%8E%9FIP%E5%9C%B0%E5%9D%80.html 视频讲解:https:/ ......
子集 随想录 训练营 随想 算法

leetcode题库39.组合总和——递归 穷举

class Solution: def combinationSum(self, candidates, target): res,ans=[],[] def findpath(candidates): if sum(ans)==target: res.append(ans.copy()) retu ......
题库 总和 leetcode 39

代码随想录算法训练营第二十七天| 39. 组合总和 40.组合总和II 131.分割回文串

39. 组合总和 卡哥建议:本题是 集合里元素可以用无数次,那么和组合问题的差别 其实仅在于 startIndex上的控制 题目链接/文章讲解:https://programmercarl.com/0039.%E7%BB%84%E5%90%88%E6%80%BB%E5%92%8C.html 视频讲解 ......
总和 随想录 回文 训练营 随想

剑指 Offer 57 - II. 和为s的连续正数序列(简单)

题目: ![](https://img2023.cnblogs.com/blog/2679751/202309/2679751-20230903111447297-1731041087.png) ``` class Solution { public: vector> findContinuousS ......
正数 序列 Offer 57 II

[LeetCode] 2707. Extra Characters in a String

You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that eac ......
Characters LeetCode String Extra 2707

[LeetCode] 1921. Eliminate Maximum Number of Monsters

You are playing a video game where you are defending your city from a group of n monsters. You are given a 0-indexed integer array dist of size n, whe ......
Eliminate LeetCode Monsters Maximum Number