leetcode 45 ii

Leetcode 1782. 统计点对的数目

这两天实训比较忙,之后补 TRANSLATE with x English Arabic Hebrew Polish Bulgarian Hindi Portuguese Catalan Hmong Daw Romanian Chinese Simplified Hungarian Russian ......
数目 Leetcode 1782

【剑指Offer】45、扑克牌顺子

# 【剑指Offer】45、扑克牌顺子 **题目描述:** LL今天心情特别好,因为他去买了一副扑克牌,发现里面居然有2个大王,2个小王(一副牌原本是54张_)...他随机从中抽出了5张牌,想测测自己的手气,看看能不能抽到顺子,如果抽到的话,他决定去买体育彩票,嘿嘿!!“红心A,黑桃3,小王,大王, ......
扑克牌 扑克 Offer

leetcode 12

![image](https://img2023.cnblogs.com/blog/3254178/202308/3254178-20230823182631200-1538353557.png) ### 算法介绍: - **哈希** - **贪心** - 实现代码如下 ```cpp class S ......
leetcode 12

iis支持.apk文件下载的设置方法

iis支持.apk文件下载的设置方法 - 知乎 (zhihu.com) IIS服务器不能下载.apk文件的解决步骤:1、打开IIS服务管理器,找到服务器,右键-属性,打开IIS服务属性;2、单击MIME类型下的“MIME类型”按钮,打开MIME类型设置窗口;3、单击“新建”,建立新的MIME类型;4 ......
文件下载 文件 方法 iis apk

Leetcode605——种花问题

假设有一个很长的花坛,一部分地块种植了花,另一部分却没有。可是,花不能种植在相邻的地块上,它们会争夺水源,两者都会死去。 给你一个整数数组 flowerbed 表示花坛,由若干 0 和 1 组成,其中 0 表示没种植花,1 表示种植了花。另有一个数 n ,能否在不打破种植规则的情况下种入 n 朵花? ......
Leetcode 问题 605

Leetcode 202. 快乐数(Happy number)

[题目链接🔗](https://leetcode.cn/problems/happy-number) 编写一个算法来判断一个数 n 是不是快乐数。 「快乐数」 定义为: 对于一个正整数,每一次将该数替换为它每个位置上的数字的平方和。 然后重复这个过程直到这个数变为 1,也可能是 无限循环 但始终变 ......
Leetcode number Happy 202

[LeetCode][121]best-time-to-buy-and-sell-stock

# Content You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a s ......

[LeetCode][96]unique-binary-search-trees

# Content Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 t ......

LeetCode 算法题解之 26 进制转换 All In One

LeetCode 算法题解之 26 进制转换 All In One 171. Excel Sheet Column Number 171. Excel 工作表列号 168. Excel Sheet Column Title 168. Excel 工作表列头 ......
题解 进制 算法 LeetCode All

Leetcode 459——重复的子字符串

给定一个非空的字符串 s ,检查是否可以通过由它的一个子串重复多次构成。 示例 1: 输入: s = "abab" 输出: true 解释: 可由子串 "ab" 重复两次构成。 示例 2: 输入: s = "aba" 输出: false 示例 3: 输入: s = "abcabcabcabc" 输出 ......
字符串 字符 Leetcode 459

[LeetCode][72]edit-distance

# Content Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three ......
edit-distance LeetCode distance edit 72

[LeetCode][85]maximal-rectangle

# Content Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: In ......

Leetcode 349.两个数组的交集(Intersection of two arrays)

[题目链接🔗](https://leetcode.cn/problems/intersection-of-two-arrays) 给定两个数组 nums1和 nums2 ,返回 它们的交集 。输出结果中的每个元素一定是 唯一 的。我们可以 不考虑输出结果的顺序 。 示例 1: ``` 输入:num ......
数组 交集 Intersection Leetcode 两个

Leetcode 849. 到最近的人的最大距离

# 题目描述 给你一个数组 seats 表示一排座位,其中 seats[i] = 1 代表有人坐在第 i 个座位上,seats[i] = 0 代表座位 i 上是空的(下标从 0 开始)。 至少有一个空座位,且至少有一人已经坐在座位上。 亚历克斯希望坐在一个能够使他与离他最近的人之间的距离达到最大化的 ......
Leetcode 849

Django在Windows server IIS部署

本文章转载于https://www.django.cn/article/show-21.html,详查看此文 教程基于Windows server2012+Python3.6+IIS之上部署django的,同样适用于server2012之上的版本服务器和windows7以上的windows操作系统。 ......
Windows Django server IIS

Leetcode 两个队列实现栈 swift

queue1 是最后生成的栈 queue2 是临时队列,把新进来的先放进去,再把queue1里的数据从头到尾读进去,然后互换 class MyStack { var queue1: [Int] = [] var queue2: [Int] = [] init() { } func push(_ x: ......
队列 Leetcode 两个 swift

IIS应用程序池自动回收机制导致异常:响应状态代码不指示成功: 503 (Service Unavailable)

今天程序在处理业务过程中报错了,持续时间很短(几秒)。 于是翻了下程序记录的日志,异常原因为:响应状态代码不指示成功: 503 (Service Unavailable) 客户端请求其他时间正常,可以确定是服务器的问题,马上连上了服务器,翻了下IIS事件: 果然可以看到此时间点,IIS自动做了一次应 ......

IIS PUT 405 异常处理方法

IIS7.5以及以上版本会对 http 的请求(put,delete)做过滤处理。客户端就会出现405.0-Method Not Allowed 错误。 这个是由WebDAV插件处理导致的。WebDAV 是超文本传输协议 (HTTP) 的一组扩展,为 Internet 上计算机之间的编辑和文件管理提 ......
方法 IIS 405 PUT

[LeetCode] 2337. Move Pieces to Obtain a String

You are given two strings start and target, both of length n. Each string consists only of the characters 'L', 'R', and '_' where: The characters 'L'  ......
LeetCode Pieces Obtain String 2337

第 111 场双周赛 - 力扣(LeetCode)

# [第 111 场双周赛 - 力扣(LeetCode)](https://leetcode.cn/contest/biweekly-contest-111/) ## [2824. 统计和小于目标的下标对数目 - 力扣(LeetCode)](https://leetcode.cn/problems/ ......
LeetCode 111

The 2022 ICPC Asia Regionals Online Contest (II)ABEFJ

# The 2022 ICPC Asia Regionals Online Contest (II) ## **A Yet Another Remainder** **题意:**给你一个正整数$x$,但是这个数被隐藏起来了。你问了电脑$min(100,n)$个问题,第$i$轮,的第$j$个问题:$O ......
Regionals Contest Online ABEFJ 2022

剑指 Offer 45. 把数组排成最小的数(中等)

题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230821220815065-610363687.png) ``` class Solution { public: string minNumber(vector& ......
数组 Offer 45

[Leetcode Weekly Contest]359

链接:[LeetCode](https://leetcode-cn.com/contest/weekly-contest-359/) ## [Leetcode]2828. 判别首字母缩略词 给你一个字符串数组 words 和一个字符串 s ,请你判断 s 是不是 words 的 首字母缩略词 。 如 ......
Leetcode Contest Weekly 359

LeetCode day 1

class Solution { public: vector<int> sortArrayByParityII(vector<int>& nums) { int n = nums.size(); vector<int> even; // 存储偶数 vector<int> odd; // 存储奇数 ......
LeetCode day

leetcode

# 最长回文子串 class Solution: def longestPalindrome(self, s: str) -> str: return self.manacher(s) @staticmethod def manacher(s: str) -> str: # 如果s是单字符的字符串, ......
leetcode

Leetcode 59. 螺旋矩阵 II && 剑指 Offer 29. 顺时针打印矩阵

这两个题非常相似,但是前者较为简单,后者较难。 由于前者访问的矩阵是方阵,因此可以通过迭代去做(因为方阵每次迭代,长和宽缩水的大小是一样的,但是矩阵不可以,因为矩阵最后一次迭代,长和宽的缩水不一定一样) class Solution { public: vector<vector<int>> gen ......
矩阵 时针 螺旋 amp Leetcode

LeetCode -- 777. 在LR字符串中交换相邻字符

给两种不同元素,可以和第三种元素交换位置,L只能向左走,R只能向右走,问start数组可否经过某些变换变换到end。 经典双指针算法。 class Solution { public: bool canTransform(string start, string end) { int n = sta ......
字符 字符串 LeetCode 777

Leetcode 242. 有效的字母异位词(Valid anagram)

[题目链接🔗](https://leetcode.cn/problems/valid-anagram) 给定两个字符串s和t, 编写一个函数来判断t是否是s的字母异位词. 注意: 若s和t中每个字符出现的次数都相同, 则称s和t互为字母异位词. 示例 1: ``` 输入: s = "anagram ......
字母 Leetcode anagram Valid 242

LeetCode 周赛上分之旅 #41 结合离散化的线性 DP 问题

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

LeetCode —— 二分查找

33. 搜索旋转排序数组 翻转点在前半部分 nums[mid]<=nums[low] 而后半部分是单调递增的,比较好判断。可以判断 nums[mid] < target <= nums[high] 去后半部分 else 去后半部分 翻转点在后半部分 nums[mid]<=nums[low] 而前半部 ......
LeetCode