leetcode 454 ii

[LeetCode] 2268. Minimum Number of Keypresses

You have a keypad with 9 buttons, numbered from 1 to 9, each mapped to lowercase English letters. You can choose which characters each button is match ......
Keypresses LeetCode Minimum Number 2268

[LeetCode] 2323. Find Minimum Time to Finish All Jobs II

You are given two 0-indexed integer arrays jobs and workers of equal length, where jobs[i] is the amount of time needed to complete the ith job, and w ......
LeetCode Minimum Finish 2323 Find

[LeetCode] 2330. Valid Palindrome IV

You are given a 0-indexed string s consisting of only lowercase English letters. In one operation, you can change any character of s to any other char ......
Palindrome LeetCode Valid 2330 IV

[LeetCode] 2340. Minimum Adjacent Swaps to Make a Valid Array

You are given a 0-indexed integer array nums. Swaps of adjacent elements are able to be performed on nums. A valid array meets the following condition ......
LeetCode Adjacent Minimum Array Swaps

[LeetCode] 2422. Merge Operations to Turn Array Into a Palindrome

You are given an array nums consisting of positive integers. You can perform the following operation on the array any number of times: Choose any two  ......
Operations Palindrome LeetCode Array Merge

[LeetCode] 1676. Lowest Common Ancestor of a Binary Tree IV

Given the root of a binary tree and an array of TreeNode objects nodes, return the lowest common ancestor (LCA) of all the nodes in nodes. All the nod ......
LeetCode Ancestor Common Binary Lowest

LeetCode之0661, 二维向量初始化

img[i][j]周围的单元格,img[i+i1][j+j1], i1=-1,0,1, j1=-1,0,1, 每个都判断一次。O(9*m*n) class Solution { public: std::vector<std::vector<int>> imageSmoother( std::vec ......
向量 LeetCode 0661

Leetcode之0709, 修改字符串

1 class Solution { 2 public: 3 string toLowerCase(string s) { 4 for(char &ch: s){ 5 if(ch>='A' && ch<='Z'){ 6 ch=tolower(ch); 7 } 8 } 9 return s; 10 } ......
字符串 字符 Leetcode 0709

[LeetCode] 2486. Append Characters to String to Make Subsequence

You are given two strings s and t consisting of only lowercase English letters. Return the minimum number of characters that need to be appended to th ......

[刷题记录Day4]Leetcode链表专题

# No.1 ## 题目 [两两交换链表中的节点](https://leetcode.cn/problems/swap-nodes-in-pairs/) ## 思路 - 模拟类型题目 - 两个节点前后交换,同时记住原来的下一个节点 - 虚拟头节点 ## 代码 ```Java public ListN ......
Leetcode 专题 Day4 Day

LeetCode 1201. Ugly Number III 数学+二分答案

An ugly number is a positive integer that is divisible by $a$, $b$, or $c$. Given four integers $n$, $a$, $b$, and $c$, return the $n$th ugly number. ......
LeetCode 答案 数学 Number 1201

LeetCode 875. Koko Eating Bananas 二分答案

Koko loves to eat bananas. There are $n$ piles of bananas, the $i$th pile has $piles[i]$ bananas. The guards have gone and will come back in `h` hours ......
LeetCode 答案 Bananas Eating Koko

Win11 将网站发布到IIS 遇到 HTTP Error 500.19 code 0x8007000d, web.config 文件有错误

当我们在IIS 发布网站时,遇到 HTTP Error 500.19 code 0x8007000d, web.config 文件有错误。 有可能是 web.config 文件指定了module: AspNetCoreModuleV2 ,但我们的机器没有安装。可尝试按照如下方式安装对应版本的IIS支 ......
错误 8007000 文件 500.19 config

iis日志分析

1、工具Log Parser ,命令行把日志文件导入数据库: logparser "SELECT *, TO_LOCALTIME(TO_TIMESTAMP(ADD(TO_STRING(date, 'yyyy-MM-dd '), TO_STRING(time, 'hh:mm:ss')),'yyyy-M ......
日志 iis

LeetCode 1011. Capacity To Ship Packages Within D Days 二分答案

A conveyor belt has packages that must be shipped from one port to another within `days` days. The ith package on the conveyor belt has a weight of $w ......
LeetCode Capacity Packages 答案 Within

leetcode练习

## 分类 题单:[code](#code) 难度:[简单](#Simple) [中等](#middle) [困难](#hard) 类型:[数组](#数组) [链表](#链表) [字符串](#字符串) [二叉树](#二叉树) [排序](#排序) 解法:[递归和迭代](#递归和迭代) [滑动窗口 ]( ......
leetcode

leetcode 546. 移除盒子

1. 题目 读题 链接:https://www.nowcoder.com/questionTerminal/a5390d76441647fbb182f34bee6a1ca7来源:牛客网一维消消乐 小v在vivo手机的应用商店中下载了一款名为“一维消消乐”的游戏,介绍如下: 1、给出一些不同颜色的豆子 ......
盒子 leetcode 546

[LeetCode] 2461. Maximum Sum of Distinct Subarrays With Length K

You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the following conditions: T ......
Subarrays LeetCode Distinct Maximum Length

[LeetCode] 2222. Number of Ways to Select Buildings

You are given a 0-indexed binary string s which represents the types of buildings along a street where: s[i] = '0' denotes that the ith building is an ......
Buildings LeetCode Number Select 2222

Leetcode日记

| 日期 | 题号 | 题目 | 解法 | 难度 | | | | | | | | 2023-07-11 | 2741 | [给定一个互不相同的正整数数组,找出**特别排列**(相邻元素互模任一为0)的总数目。取余](https://leetcode.cn/problems/special-permu ......
Leetcode 日记

代码随想录算法训练营第三十三天| 1049. 最后一块石头的重量 II 494. 目标和 474.一和零

1049. 最后一块石头的重量 II 思路: 因为含有两个石头的相撞,所以需要把dp的目标值改成sum/2, 然后取得这个目标值的最大值,然后对sum-2*target 代码: 1 // 要求:有多个石头,两两撞击,取得剩下的石头的最小值 2 // ——》一定要碰到最后一个 3 // 注意: 4 / ......
随想录 训练营 随想 算法 重量

2069. 模拟行走机器人 II (Medium)

问题描述 2069. 模拟行走机器人 II (Medium) 给你一个在 XY 平面上的 width x height 的网格图, 左下角 的格子为 (0, 0) , 右上角 的格子 为 (width - 1, height - 1) 。网格图中相邻格子为四个基本方向之一( "North", "Ea ......
机器人 机器 Medium 2069 II

2069. Walking Robot Simulation II (Medium)

Description 2069. Walking Robot Simulation II (Medium) A width x height grid is on an XY-plane with the bottom-left cell at (0, 0) and the top-right c ......
Simulation Walking Medium Robot 2069

[LeetCode] 874. Walking Robot Simulation

A robot on an infinite XY-plane starts at point (0, 0) facing north. The robot can receive a sequence of these three possible types of commands: -2: T ......
Simulation LeetCode Walking Robot 874

[LeetCode] 2597. The Number of Beautiful Subsets

You are given an array nums of positive integers and a positive integer k. A subset of nums is beautiful if it does not contain two integers with an a ......
Beautiful LeetCode Subsets Number 2597

代码随想录算法训练营第59天 | ● 503.下一个更大元素II ● 42. 接雨水 - 第10章 动态规划part02

第十章 单调栈part02 ● 503.下一个更大元素II ● 42. 接雨水 详细布置 503.下一个更大元素II 这道题和 739. 每日温度 几乎如出一辙,可以自己尝试做一做 https://programmercarl.com/0503.%E4%B8%8B%E4%B8%80%E4%B8%AA ......
随想录 训练营 随想 算法 雨水

LeetCode 852. Peak Index in a Mountain Array 二分

An array arr a mountain if the following properties hold: * `arr.length` >= 3 * There exists some i with `0 arr[i + 1] > ... > arr[arr.length - 1] ``` ......
LeetCode Mountain Index Array Peak

剑指 Offer 58 - II. 左旋转字符串

``` class Solution { public: string reverseLeftWords(string s, int n) { reverse(s.begin(),s.begin()+n); #反转用reverse而不是s.reverse reverse(s.begin()+n,s. ......
左旋 字符串 字符 Offer 58

CF1769C2 Подкрутка II 题解

看到同机房的好哥们发了贪心做法的题解,心血来潮就A了这道题写了真·dp的题解。 虽然方法比老师上课讲的麻烦的多,并不是最优解,但至少是我自己思考得出的结果。 ## 题目要求 输入一个原序列 $a_i$,从 $a_i$ 中求得某个区间 $[l,r]$。 此区间经过题面中所描述的修改操作(任何元素 $+ ......
题解 1769C 1769 CF C2

leetcode104二叉树搜索

深度优先搜索,递归 maxDepth(TreeNode* root){ if(!root)return 0; return max(maxDepth(root->left),maxDepth(root->right))+1; } 广度优先搜索,队列 queue<TreeNode*>q; q.push ......
leetcode 104