E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
longest
【无标题】
题解:此题为1004.最大连续1的个数III-力扣(Leetcode)的一个特例,即k=1时:classSolution{public:int
longest
Subarray(vector&nums){intleft
爱吃萝卜的猪
·
2025-06-12 12:25
leetcode
leetcode
算法
动态规划问题案例
除了经典的斐波那契数列(FibonacciNumbers)和最长公共子序列(
Longest
CommonSubsequence,LCS)问题之外,动态规划还可以解决许多经典案例。
柔丽君
·
2025-06-07 13:37
算法题
笔记
动态规划
06.最长连续序列
✅C++代码classSolution{public:int
longest
Co
Chenyu_310
·
2025-06-07 00:39
LeetCode
hot
哈希算法
算法
网络协议
http
数据库
android
Python for循环技巧
/usr/bin/envpython#-*-coding:utf-8-*-#__author__=fromitertoolsimportzip_
longest
fromitertoolsimportchain
xwupiaomiao
·
2025-06-06 04:23
python
前端
linux
数据库
javascript
每日算法刷题Day21 6.3:leetcode二分答案2道题,用时1h20min(有点慢)
3.2982.找出出现至少三次的最长特殊子字符串II(中等,学习)https://leetcode.cn/problems/find-
longest
-special-substring-that-occurs-thrice-ii
爱coding的橙子
·
2025-06-05 17:05
算法
算法
leetcode
职场和发展
LCS 问题解释
最长公共子序列问题(
Longest
CommonSubsequence),该问题可以表述为,在A,BA,BA,B中找出一段子序列xxx,使得xxx既是AAA的子序列,又是BBB的子序列。
网络骑士hrg.
·
2025-05-31 20:55
c++
经验分享
动态规划
Leetcode 340. 至多包含 K 个不同字符的最长子串
1.2.题目地址https://leetcode.cn/problems/
longest
-substring-with-at-most-k-distinct-characters/description
Benjamin Tang
·
2025-05-31 17:01
leetcode
算法
滑动窗口
实习校招面试手撕代码真题题型7——滑动窗口
讲滑动窗口的视频,我就是看了他讲的,讲的很不错:滑动窗口【基础算法精讲03】_哔哩哔哩_bilibili1最长不重复子串3.无重复字符的最长子串-力扣(LeetCode)publicintlengthOf
Longest
Substring
学会歌唱的老周
·
2025-05-23 18:23
#
面试
java
数据结构
leetcode
算法题
手撕代码
面试手撕
《算法笔记》11.8小节——动态规划专题->总结 问题 D: Coincidence
题目描述Finda
longest
commonsubsequenceoftwostrings.输入Firstandsecondlineofeachinputcasecontaintwostringsoflowercasecharactera
圣保罗的大教堂
·
2025-05-21 14:40
《算法笔记》
动态规划
2900. 最长相邻不相等子序列 I
2900.最长相邻不相等子序列I题目链接:2900.最长相邻不相等子序列I代码如下:classSolution{public:vectorget
Longest
Subsequence(vector&words
咔咔咔的
·
2025-05-20 09:05
c++
LeetCode 2900.最长相邻不相等子序列 I:阅读理解题——O(n)一次遍历(贪心)
【LetMeFly】2900.最长相邻不相等子序列I:阅读理解题——O(n)一次遍历(贪心)力扣题目链接:https://leetcode.cn/problems/
longest
-unequal-adjacent-groups-subsequence-i
Tisfy
·
2025-05-17 23:56
题解
#
力扣LeetCode
leetcode
算法
题解
贪心
Leetcode (力扣)做题记录 hot100(3,560,160,206)
classSolution{publicintlengthOf
Longest
Substring(Strings){HashMapmap=newHashMap<>();intslow=0;intmax=0
MarkHard123
·
2025-05-15 23:43
力扣日常
leetcode
散列表
算法
手撕算法(定制整理版2)
最长无重复子字符串classSolution(object):deflengthOf
Longest
Substring(self,s):""":types:str:rtype:int"""ifnots:return0max_len
chao_789
·
2025-05-14 08:51
算法刷题记录
面试
笔记
算法
面试算法刷题练习1(核心+acm)
3.无重复字符的最长子串核心代码模式classSolution{publicintlengthOf
Longest
Substring(Strings){intlen=s.length();int[]num
PowerCloud
·
2025-05-12 01:16
面试
面试
算法
90%人没理清的 iptables 核心:七表五链实战指北
MooneyFalls,AZ,USAMooneyFalls,AZ,USAMooneyFalls,AZ,USA每日语录:“It’sajobthat’sneverstartedthattakesthe
longest
tofinish
YAMLMaster
·
2025-05-01 03:30
Linux
云原生
linux
kubernetes
Leetcode刷题报告1——哈希表
字母异位词分组](https://leetcode.cn/problems/group-anagrams/)题干题解[128.最长连续序列](https://leetcode.cn/problems/
longest
-consecutive-sequence
红白小蛋糕
·
2025-04-30 22:27
LeetCode刷题
leetcode
散列表
哈希算法
Leetcode刷题记录19——无重复字符的最长子串
题源:https://leetcode.cn/problems/
longest
-substring-without-repeating-characters/description/?
张书名
·
2025-04-26 23:55
Leetcode刷题记录
leetcode
算法
职场和发展
力扣hot100_滑动窗口_python版本
代码:classSolution:deflengthOf
Longest
Substring(self,s:str)->int:tmpStr=[]maxLen=0foriins:ifinotintmpStr
Y1nhl
·
2025-04-26 06:31
力扣
leetcode
python
算法
[力扣 Hot100]无重复字符的最长子串
代码classSolution{public:intlengthOf
Longest
Substrin
谛听misa
·
2025-04-23 19:17
力扣Hot100题
leetcode
算法
字符串
Leetcode Top100题目和答案(1-10)
LeetcodeTop100题目和答案(1-10)1.两数之和(TwoSum)2.反转链表(ReverseLinkedList)3.合并两个有序链表(MergeTwoSortedLists)4.最长回文子串(
Longest
PalindromicSubstring
申徒嘉
·
2025-04-21 19:48
C++基础
leetcode
Longest
Continuous Increasing Subsequence
Givenanunsortedarrayofintegers,findthelengthof
longest
continuousincreasingsubsequence(subarray).Example1
小·幸·运
·
2025-04-20 22:17
Leetcode题解
动态规划
最长不下降子序列
Longest
Continuous Increasing Subsequence python
给定无序整数数组,计算最长连续递增子序列的长度classSolution(object):deffindLengthOfLCIS(self,nums):""":typenums:List[int]:rtype:int"""count=1maxcount=1iflen(nums)==0:return0foriinrange(1,len(nums)):ifnums[i]>nums[i-1]:count
Adamoptimization
·
2025-04-20 22:46
leetcode
leetcode
python
Longest
Continuous Increasing Subsequence(最长连续递增子序列)
Givenanunsortedarrayofintegersnums,returnthelengthofthe
longest
continuousincreasingsubsequence(i.e.subarray
蓝羽飞鸟
·
2025-04-20 22:46
leetcode
算法
leetcode
Longest
Continuous Increasing Subsequence
文章作者:Tyan博客:noahsnail.com|CSDN|简书1.Description2.SolutionclassSolution{public:intfindLengthOfLCIS(vector&nums){intmax_length=0;if(nums.size()nums[i-1]){length++;}else{length=1;}max_length=max(max_lengt
SnailTyan
·
2025-04-20 22:16
Leetcode
Leetcode
搜广推校招面经二十四
阿里推荐算法一、无重复字符的最长子串(hot100_滑动窗口_中等)classSolution:deflengthOf
Longest
Substring(self,s:str)->int:dic={}left
Y1nhl
·
2025-04-12 10:38
搜广推面经
推荐算法
搜索引擎
机器学习
算法
求职招聘
Day51 | 3. 无重复字符的最长子串、12. 整数转罗马数字、49. 字母异位词分组、73. 矩阵置零
3.无重复字符的最长子串题目链接:3.无重复字符的最长子串-力扣(LeetCode)题目难度:中等代码:classSolution{publicintlengthOf
Longest
Substring(Strings
麦城稻香咖啡
·
2025-04-06 15:06
哈希表
算法
⭐算法OJ⭐字符串与数组【动态规划 DP】(C++实现)最长公共子序列 LCS + 最短公共超序列 SCS
文章目录1143.
Longest
CommonSubsequence问题描述解题思路C++实现1092.ShortestCommonSupersequence解题思路C++
Vitalia
·
2025-04-05 05:20
算法OJ
算法
动态规划
c++
LC329. 矩阵中的最长递增路径
回溯加记忆,记忆的原因是在for循环里回溯时会遇到已经计算过的值,避免重复计算def
longest
IncreasingPath(self,matrix):""":typematrix:List[List
996冲冲冲
·
2025-04-04 04:03
LC回溯
python
leetcode简单题4 N.14 最长公共前缀 rust描述
//["flower","flow","flight"]"fl"//["dog","racecar","car"]""//纵向扫描同一个索引扫描其他所有字符pubfn
longest
_common_prefix
独好紫罗兰
·
2025-03-30 08:09
leetcode
算法
rust
(nice!!!)(LeetCode 热题 100)32. 最长有效括号(动态规划dp)
C++版本:classSolution{public:int
longest
ValidParentheses(strings){intn=s.size();vectorf(n);//最长有效字符串intmx
岁忧
·
2025-03-28 22:44
LeetCode
java版刷题
LeetCode
热题
100
leetcode
动态规划
算法
java
c++
力扣 32. 最长有效括号 python AC
动态规划classSolution:def
longest
ValidParentheses(self,s):s=''+ssize=len(s)dp=[0]*sizeforiinrange(2,size):
VirgoAsumita
·
2025-03-28 03:59
leetcode
python
算法
【力扣题解】32. 最长有效括号
【题目设置】:难度:困难链接:https://leetcode-cn.com/problems/
longest
-valid-parentheses题目描述:给你一个只包含‘(’和‘)’的字符串,找出最长有效
JordanPanther
·
2025-03-28 03:28
算法
动态规划
算法
力扣刷题-热题100题-第3题(C、python)
128.最长连续序列-力扣(LeetCode)https://leetcode.cn/problems/
longest
-consecutive-sequence/?
weixin_44505472
·
2025-03-25 20:39
leetcode
算法
职场和发展
【绝对有用】C++ 数组越界 和并查集
根据AddressSanitizer的错误报告,问题出现在您的Solution::
longest
Consecutive函数中,位于solution.cpp文件的第17行。
fighting的码农(zg)-GPT
·
2025-03-22 08:44
C++
c++
算法
开发语言
数据结构
动态规划问题
示例2:输入:s="cbbd"输出:"bb"代码实现:char*
longest
Palindrome(char*s){intn=strlen(s);if(n=n)break;if(s[i]!
慕雪_mx
·
2025-03-20 14:44
动态规划
算法
数据结构
LeetCode刷题实战522:最长特殊序列 II
今天和大家聊的问题叫做最长特殊序列II,我们先来看题面:https://leetcode-cn.com/problems/
longest
-uncommon-subsequence-ii/Givenanarrayof
编程IT圈
·
2025-03-11 06:41
字符串
算法
leetcode
java
数据结构
1493. 删掉一个元素以后全为 1 的最长子数组
目录一、题目二、思路2.1解题思路2.2代码尝试2.3疑难问题2.4复盘三、解法四、收获4.1心得4.2举一反三一、题目二、思路2.1解题思路2.2代码尝试classSolution{public:int
longest
Subarray
海绵波波107
·
2025-03-08 03:58
#
算法和leetcode
leetcode
516.最长回文子序列
classSolution:def
longest
PalindromeSubseq(self,s:str)->int:dp=[[0]*len(s)foriinrange(len(s))]foriinrange
程序员正在诞生中
·
2025-03-05 16:28
代码随想录打卡
蓝桥杯刷题
算法
python
leetcode
职场和发展
数据结构
动态规划
蓝桥杯
LeetCode 热题100 3. 无重复字符子串
:因为无重复字符的最长子串是“abc”,所以其长度为3解析:采用哈希表来进行匹配,通过滑动窗口,记录滑动窗口的最大长度即可class Solution {public: int lengthOf
Longest
Substring
lays03
·
2025-03-04 15:43
代码
算法
leetcode
算法
职场和发展
【C语言】对称密码——栅栏的加密和解密
③例如:栅栏层数为2明文:THE
LONGEST
DAYMUSTHAVEANEND加密:1、把将要传递的信息中的字母交替排成上下两行。
爱因斯坦乐
·
2025-03-03 00:38
c语言
开发语言
算法
LeetCode 解题思路 2(Hot 100)
Java代码:classSolution{publicint
longest
Consecutive(int[]nums){SetnumSet=newHashSet<>();for(intnum:nums)
S01d13r
·
2025-03-02 22:52
leetcode
算法
职场和发展
蓝桥杯练习代码
classSolution(object):def
longest
CommonPrefix(self,st
月吟荧静
·
2025-02-28 10:22
蓝桥杯训练题目
蓝桥杯
笔记
学习
【超详细】动态规划子序列问题总结
子序列就是在一个数组中按顺序挑选若干数,子数组是连续的子序列,视为特殊的子序列问题子序列最长递增子序列300.最长递增子序列-力扣(LeetCode)https://leetcode.cn/problems/
longest
-increasing-subsequence
周玄九
·
2025-02-28 02:41
动态规划
算法
【leetcode hot 100 128】最长连续序列
暴力解决:将存如hashmap中,再从min_num到max_num中寻找hashmap中存在的连续数classSolution{publicint
longest
Consecutive(int[]nums
longii11
·
2025-02-28 00:22
leetcode
算法
职场和发展
【优选算法】滑动窗口 ⽆重复字符的最⻓⼦串
classSolution{public:intlengthOf
Longest
Substring(strings){intret=0;//记录结果in
Lehjy
·
2025-02-25 08:03
算法学习
算法
数据结构
Leetcode热题100(5) - 最长回文子串
Questionhttps://leetcode.cn/problems/
longest
-palindromic-substring/description/给你一个字符串s,找到s中最长的回文子串。
·
2025-02-24 19:38
算法力扣
Length of
Longest
V-Shaped Diagonal Segment
Leetcode3459.Lengthof
Longest
V-ShapedDiagonalSegment1.解题思路2.代码实现题目链接:3459.Lengthof
Longest
V-ShapedDiagonalSegment1
Espresso Macchiato
·
2025-02-19 04:34
leetcode笔记
leetcode
3459
leetcode
hard
leetcode周赛437
动态规划
剪枝
面试经典150题——最长公共前缀
空间复杂度:O(1)publicString
longest
CommonPrefix(String[]strs){Stringpre=strs[0];for
菜菜的小彭
·
2025-02-17 23:49
java
面试经典150题
面试
职场和发展
leetcode
算法
java
Leetcode 712. Minimum ASCII Delete Sum for Two Strings
returnthelowestASCIIsumofdeletedcharacterstomaketwostringsequal.AlgorithmDynamicProgramming(DP):similaras
Longest
CommonSubsequence
小白菜又菜
·
2025-02-17 06:44
Leetcode
解题报告
动态规划(DP)
leetcode
算法
leetcode hot 100 刷题记录(medium)
classSolution{public:intlengthOf
Longest
Substring(strings){//暴力的一次for,检查每个字符作为首字符时候的最长子串if(s.size
激昂~逐流
·
2025-02-17 04:33
Leetcode
leetcode
算法
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他