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
SuffixArray练习题
SuffixArray练习题题目importjava.util.Arrays;classSuffixArray{//LCP:
Longest
commonprefix/*字符串后缀,指从字符串某个*位置开始到字符串末尾的字串
miss you ya
·
2023-10-01 12:54
软件测试
java
算法
开发语言
LeetCode解析(三):
Longest
Substring Without Repeating Characters
Givenastring,findthelengthofthe
longest
substringwithoutrepeatingcharacters.Example:Input:"abcabcbb"Output
Wingbu
·
2023-10-01 09:16
Longest
Substring with At Least K Repeating Characters
Givenastringsandanintegerk,returnthelengthofthe
longest
substringofssuchthatthefrequencyofeachcharacterinthissubstringisgreaterthanorequaltok.classSolution
bjrzxyt
·
2023-09-30 07:42
Longest
Substring Without Repeating Characters
原题链接3.
Longest
SubstringWithoutRepeatingCharactersGivenastring,findthelengthofthe
longest
substringwithoutrepeatingcharacters.Example1
煮酒_zzh
·
2023-09-30 06:55
【力扣】动态规划题目之“最”系列
文章目录一、动态规划问题解决步骤二、力扣经典例题[5.最长回文子串](https://leetcode.cn/problems/
longest
-palindromic-substring/)[32.最长有效括号
NCY_92377
·
2023-09-30 05:23
leetcode
动态规划
算法通关村第16关【白银】| 滑动窗口经典问题
窗口内为无重复字符子串,使用哈希表来保存最新碰到的字符下标,只要出现重复就缩小left指针,缩小到无重复字符也就是map.get(c)+1classSolution{publicintlengthOf
Longest
Substring
三水木_
·
2023-09-29 02:31
算法
算法
leetcode
数据结构
014-
Longest
Common Prefix
Longest
CommonPrefixWriteafunctiontofindthe
longest
commonprefixstringamongstanarrayofstrings.使用最挫的算法,挨个遍历
英武
·
2023-09-29 01:16
数组中的最长山脉java实现
数组中的最长山脉https://leetcode-cn.com/problems/
longest
-mountain-in-array/我们把数组A中符合下列属性的任意连续子数组B称为“山脉”:B.length
WukongGo
·
2023-09-28 19:41
LeetCode
java
leetcode
算法
Lintcode397
Longest
Increasing Continuous Subsequence solution 题解
【题目描述】Giveanintegerarray,findthe
longest
increasingcontinuoussubsequenceinthisarray.Anincreasingcontinuoussubsequence
程风破浪会有时
·
2023-09-28 08:43
Leetcode日练笔记39 [二叉树recursion专题] #104 #101 Maximum Depth of Binary Tree & Symmetric Tree {Python}
#104MaximumDepthofBinaryTreeGiventherootofabinarytree,returnitsmaximumdepth.Abinarytree'smaximumdepthisthenumberofnodesalongthe
longest
pathfromtherootnodedowntothefarthestleafnode.Example1
BabyFennec
·
2023-09-27 11:53
leetcode日练
leetcode
算法
数据结构
python
5. 最长回文子串
res:str2;}returnres;}privateStringfind
Longest
(Strings,intl,intr){while(l>=0&&r
dotJunz
·
2023-09-27 11:59
#
HOT100
算法
LeetCode力扣014:最长公共前缀
最长公共前缀实现思路将字符串拆开成字符再将拆开的字符放入列表中最后将拆开的三个字符串的字符一一对比代码实现classSolution(object):def
longest
CommonPrefix(self
又菜又爱编程的小白
·
2023-09-27 10:36
leetcode
算法
职场和发展
Leetcode
128.
Longest
ConsecutiveSequence(*)classSolution{public:int
longest
Consecutive(vector&nums){unordered_setset
Zoeyii935
·
2023-09-27 10:16
哈希算法
算法
算法刷题笔记-hot100-1-10(进行中)
problems/add-two-numbers/)题意题解方法1:不使用虚拟头节点方法2:代码优化:使用虚拟头节点[3.无重复字符的最长子串](https://leetcode.cn/problems/
longest
-subs
天生我才~~
·
2023-09-26 23:18
数据结构与算法
算法
链表
leetcode
leetcode hot 3-4
3.无重复字符的最长字串classSolution{public:intlengthOf
Longest
Substring(strings){unordered_setocc;//哈希集合,记录每个字符是否出现过
悲伤の李某
·
2023-09-26 23:48
leetcode热题100
leetcode
排序算法
算法
hot100-无重复最长子串
思路最典型的dp问题,d[i]=d[i-1]+1(与d[i-1]中无重复),d[i]=n(有重复)代码classSolution{publicintlengthOf
Longest
Substring(Strings
午睡之前吃颗糖
·
2023-09-26 23:48
hot100个人题解整理
动态规划
leetcode
算法
Longest
Increasing Subsequence
DescriptionGivenasequenceofintegers,findthe
longest
increasingsubsequence(LIS).YoucodeshouldreturnthelengthoftheLIS.ClarificationWhat'sthedefinitionof
longest
increasingsubsequence
鸭蛋蛋_8441
·
2023-09-26 07:43
Longest
Valid Parentheses(week11)
32.
Longest
ValidParentheses题目描述Givenastringcontainingjustthecharacters'('and')',findthelengthofthe
longest
valid
piubiupiu
·
2023-09-25 22:45
算法训练营DAY52|1143.最长公共子序列、1035.不相交的线、53. 最大子序和
1143.最长公共子序列-力扣(LeetCode)https://leetcode.cn/problems/
longest
-common-subsequence/最长公共子序列,与上一期最后一道的区别在于本题要求的是两个数组的可以删除中间数据的最长公共的部分
想做渗透的杨
·
2023-09-25 06:20
训练营
leetcode
算法
职场和发展
动态规划
Leetcode 409. 最长回文串
文章目录题目代码(9.24首刷自解)题目Leetcode409.最长回文串代码(9.24首刷自解)classSolution{public:int
longest
Palindrome(strings){unordered_mapmp
JehanRio
·
2023-09-25 05:41
Leetcode专栏
leetcode
算法
职场和发展
leetcode 剑指offer刷题归类之 二 动态规划篇
测试样例:"1AB2345CD",9,"12345EF",7返回:4publicclass
Longest
Substring{//最长公共子串要求是连续的publicintfind
Longest
(StringA
茴香豆的茴有六种写法
·
2023-09-25 05:59
数据结构与算法
Leetcode1438
Longest
Continuous Subarray With Absolute Diff Less Than or Equal to Limit (滑动窗口+双单调队列)
Longest
ContinuousSubarrayWithAbsoluteDiffLessThanorEqualtoLimitMediumGivenanarrayofintegersnumsandanintegerlimit
纸上得来终觉浅 绝知此事要躬行
·
2023-09-24 07:38
算法
leetcode3
Longest
SubstringWithoutRepeatingCharactersGivenastring,findthelengthofthe
longest
substringwithoutrepeatingcharacters.Example1
小烈yhl
·
2023-09-24 05:28
代码随想录算法训练营Day53 | 动态规划(14/17) LeetCode 1143.最长公共子序列 1035.不相交的线
继续练习子序列的问题第一题1143.
Longest
CommonSubsequenceGiventwostringstext1andtext2,returnthelengthoftheir
longest
commonsubsequence.Ifthereisnocommonsubsequence
Scouser_H
·
2023-09-24 01:43
LeetCode
动态规划
leetcode
算法
【动态规划刷题 16】最长等差数列 (有难度) && 等差数列划分 II - 子序列
1027.最长等差数列https://leetcode.cn/problems/
longest
-arithmetic-subsequence/给你一个整数数组nums,返回nums中最长等差子序列的长度
Tom·猫
·
2023-09-23 06:49
动态规划刷题
动态规划
算法
代码随想录算法训练营 动态规划part14
一、最长公共子序列1143.最长公共子序列-力扣(LeetCode)classSolution{publicint
longest
CommonSubsequence(Strings1,Strings2){
阿玛兰妲。
·
2023-09-23 05:37
动态规划
算法
代码随想录算法训练营第53天|1143. 最长公共子序列,1035. 不相交的线,53. 最大子数组和
链接:1143.最长公共子序列链接:1035.不相交的线链接:53.最大子数组和1143.最长公共子序列lassSolution{publicint
longest
CommonSubsequence(Stringtext1
dreams00
·
2023-09-23 00:29
算法
数据结构
LeetCode3. 无重复字符的最长子串
来啦,从开头选一题写吧,感觉得以专题为基础练习的……无重复字符的最长子串用unordered_map和滑动窗口解决此问题classSolution{public:intlengthOf
Longest
Substring
clarie huang
·
2023-09-22 11:30
算法题
leetcode
算法
职场和发展
2 Sequences DP -
Longest
Common Subsequence
http://www.lintcode.com/en/problem/
longest
-common-subsequence/http://www.jiuzhang.com/solutions/
longest
-common-subsequence
Super_Alan
·
2023-09-21 22:23
LeetCode__无重复字符的最长子串
LeetCode__无重复字符的最长子串官方地址无重复字符的最长子串代码classSolution{public:intlengthOf
Longest
Substring(strings){//哈希集合,
金色暖阳
·
2023-09-21 16:58
leetcode
leetcode
算法
职场和发展
Java-最长回文串
classSolution{publicint
longest
Palindrome(Strings){int[]b=newint[128];for(inti=0;i
一生太久只争朝夕
·
2023-09-21 14:48
[python 刷题] 128
Longest
Consecutive Sequence
[python刷题]128
Longest
ConsecutiveSequence题目:Givenanunsortedarrayofintegersnums,returnthelengthofthe
longest
consecutiveelementssequence.YoumustwriteanalgorithmthatrunsinO
GoldenaArcher
·
2023-09-21 10:37
#
leetcode
python
算法
开发语言
给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。
>解题思路使用注释标注的很详细方法1funclengthOf
Longest
Substring(_s:String)->Int{varmaxCount=0varcurrCount=0varsubString
amin_huihui
·
2023-09-21 10:22
滑动窗口 合集
3.无重复字符的最长子串classSolution{publicintlengthOf
Longest
Substring(Strings){if(s.length()==0)return0;HashMapmap
Phoebe_Liu
·
2023-09-21 09:14
【滑动窗口】LCR 016. 无重复字符的最长子串
无重复字符的最长子串解题思路窗口内的字符串就是不重复子串每次遇到新的字符看看窗口内是否存在该字符如果存在直接剔除然后调整窗口左边界不存在添加窗口内部右边界++classSolution{publicintlengthOf
Longest
Substring
luzhoushili
·
2023-09-21 01:47
#
Leetcode
算法
java
数据结构
小算法:无重复字符的最长子串
在LeetCode的第一天,评论区遇到了印象深刻的答案传送门:https://leetcode-cn.com/problems/
longest
-substring-without-repeating-characters
cooooper
·
2023-09-20 13:41
2020-01-02
Longest
Substring Without Repeating Characters
给你一个字符串,要求你找出这个字符串中长度最长的子串,返回其长度。要求这个子串不能有重复的字符出现。Note:这里是子串,不是子序列,所以必须是连续的ThinkaboutSETwhenwetryingtoidentifyifsthhasarepeatedcharactersorsthlikethis.Solution1:Bruteforce---TimeLimitedExceeded要求找最长子串
alyssaja7
·
2023-09-20 10:00
day-53 代码随想录算法训练营(19)动态规划 part 14
1143.最长公共子序列(坐牢)classSolution{public:int
longest
CommonSubsequence(stringtext1,stringtext2){intn=text1.
djykkkkkk
·
2023-09-20 09:35
#
代码随想录算法训练营(19)
算法
动态规划
1218. 最长定差子序列
1218.最长定差子序列原题链接:完成情况:解题思路:参考代码:原题链接:1218.最长定差子序列https://leetcode.cn/problems/
longest
-arithmetic-subsequence-of-given-difference
Wzideng
·
2023-09-19 22:43
算法知识
#
LeetCode题解
java学习
算法
java
leetcode
数据结构
分治法
1218. 最长定差子序列
1218.最长定差子序列原题链接:完成情况:解题思路:参考代码:原题链接:1218.最长定差子序列https://leetcode.cn/problems/
longest
-arithmetic-subsequence-of-given-difference
Wzideng
·
2023-09-19 22:42
算法知识
#
LeetCode题解
java学习
链表
数据结构
算法
leetcode
java
Longest
Increasing Subsequence
https://leetcode.com/problems/
longest
-increasing-subsequence/description///状态定义:dp[i]以nums[i]为尾的LIS长度
Super_Alan
·
2023-09-19 10:25
leetcode字符串 无重复字符的最长子串
总体比较简单,不细说了publicintlengthOf
Longest
Substring(Strings){LinkedHashSetset=newLinkedHashSettempSet=newLinkedHashSetmaxSize
韩新虎
·
2023-09-18 21:21
数组中最长连续子数组
*链接:https://leetcode-cn.com/problems/
longest
-consecutive-sequence**输入:nums=[100,4,200,1,3,2]*输出:4*解释:
天问_玄
·
2023-09-18 20:56
力扣第44天----第1143题、第1035题、第53题
classSolution{public:int
longest
CommonSub
凑合看吧
·
2023-09-17 11:51
leetcode
算法
数据结构
【LeetCode热题100】--128. 最长连续序列
128.最长连续序列先对数组进行排序,不断尝试x+1,x+2,…是否存在,不断枚举并更新答案classSolution{publicint
longest
Consecutive(int[]nums){if
小d<>
·
2023-09-17 10:41
LeetCode
leetcode
算法
java
c++合唱队形(详解)
最长上升子序列(
Longest
IncreasingSubsequence,简称LIS)是指在一个序列中,选取其中的若干个元素构成一个新的子序列,要求选出的元素满足递增的关系,且该子序列的长度最大。
玛卡巴卡哈哈
·
2023-09-17 04:12
c++
算法
动态规划
leetcode 3. 无重复字符的最长子串
代码如下:classSolution{public:intlengthOf
Longest
Substring(strings){if(s.size
jay神
·
2023-09-16 16:55
leetcode专栏
leetcode
算法
cpp
数据结构
Longest
Palindromic Subsequence
DescriptionGivenastrings,findthe
longest
palindromicsubsequence'slengthins.Youmayassumethatthemaximumlengthofsis1000
Nancyberry
·
2023-09-16 15:30
LeetCode-热题100-笔记-day02
128.最长连续序列https://leetcode.cn/problems/
longest
-consecutive-sequence/给定一个未排序的整数数组nums,找出数字连续的最长序列(不要求序列元素在原数组中连续
This_is_code
·
2023-09-16 13:00
leetcode
leetcode
笔记
算法
LeetCode【3. 无重复字符的最长子串】
publicintlengthOf
Longest
Substring(Strings){intn=s.length();int[]charIndex=newint[128];//用于存储字符的索引,ASCII
Arenaschi
·
2023-09-16 05:23
{easy}算法小题
leetcode
linux
算法
jar
职场和发展
开发语言
java
上一页
10
11
12
13
14
15
16
17
下一页
按字母分类:
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
其他