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
solution
力扣6.Z字形变换
class
Solution
{publicStringconvert(Strings,intnumRows){intlength=s.length();//获取字符串的长度char[]arr=s.toCharArray
听风客1
·
2024-09-01 02:44
算法与数据结构进阶(java)
java
算法
leetcode
2022-03-23我为什么要读《类比思维》——作者:细谷功
从科学史上看,类比思维在许多重大科学发现的过程中扮演者极为重要的角色(2021-11-20Analogyisattheheartofgeneratinginnovative
solution
s-(jianshu.com
Thinker
·
2024-08-31 17:31
Python | Leetcode Python题解之第384题打乱数组
题目:题解:class
Solution
:def__init__(self,nums:List[int]):self.nums=numsself.original=nums.copy()defreset(
Mopes__
·
2024-08-31 13:53
分享
Python
Leetcode
题解
表达式求值
代码:class
Solution
{public:intsolve(strings){stackval;stackops;for(inti=0;i='0'&&s[i]='0')tmp=tmp*10+s[i
松小白song
·
2024-08-31 12:52
#
栈
算法
力扣1.两数之和(哈希表)
class
Solution
{//定义一个名为twoSum的方法,接收一个整数数组nums和一个整数target作为参数publicint[]twoSum(int[]nums,inttarget){//创建一个
听风客1
·
2024-08-31 11:12
算法与数据结构入门(java)
算法
leetcode
数据结构
Python | Leetcode Python题解之第385题迷你语法分析器
题目:题解:class
Solution
:defdeserialize(self,s:str)->NestedInteger:index=0defdfs()->NestedInteger:nonlocalindexifs
Mopes__
·
2024-08-31 09:01
分享
Python
Leetcode
题解
Python | Leetcode Python题解之第386题字典序排数
题目:题解:class
Solution
:deflexicalOrder(self,n:int)->List[int]:ans=[0]*nnum=1foriinrange(n):ans[i]=numifnum
Mopes__
·
2024-08-31 09:01
分享
Python
Leetcode
题解
Java | Leetcode Java题解之第385题迷你语法分析器
题目:题解:class
Solution
{intindex=0;publicNestedIntegerdeserialize(Strings){if(s.charAt(index)=='['){index
m0_57195758
·
2024-08-31 09:30
分享
Java
Leetcode
题解
C++ | Leetcode C++题解之第383题赎金信
题目:题解:class
Solution
{public:boolcanConstruct(stringransomNote,stringmagazine){if(ransomNote.size()>magazine.size
Ddddddd_158
·
2024-08-31 08:54
经验分享
C++
Leetcode
题解
LeetCode 练习 day10
class
Solution
{publicStringlongestCommonPrefix(Strin
小黑DX
·
2024-08-31 08:52
leetcode
java
linux
算法day16|654.最大二叉树、617.合并二叉树、700.二叉搜索树中的搜索、98.验证二叉搜索树
具体代码如下:class
Solution
{public:Tree
桃酥403
·
2024-08-31 06:05
算法
数据结构
c++
leetcode
日常刷题(21)
1.二叉树遍历1.1.题目描述复习一下二叉树的三种遍历方式,前序、中序、后序本题以中序为例,说明一下两种写法1.2.代码递归def
solution
(root):ifnotroot:return[]return
solution
枯藤老树周黑鸭
·
2024-08-31 01:33
日常刷题
算法
leetcode
职场和发展
[LeetCode]336. Palindrome Pairs
和所在位置加入map,再遍历数组,内层遍历当前字符串,将字符串分隔成前后两个部分,判断这两个部分是否为回文,如果是,则将另一部分翻转,并在map中找是否存在,如果存在则这两者可以构成回文publicclass
Solution
gqk289
·
2024-08-31 01:00
LeetCode
SAP预制发票,相关屏幕增强及bapi 增强
需要对屏幕增强,实现可以输入xref1,xref2.如下图:图中,参考代码1和参考代码2都是通过隐式增强放出来的,具体操作过程请查看链接:XREF1,XREF2,XREF3inMIRO–theultimate
solution
IT 与丘
·
2024-08-31 01:28
SAP精品资源
SAP
551. 学生出勤记录 I
551.学生出勤记录I题目链接:551.学生出勤记录I代码如下:class
Solution
{public:boolcheckRecord(strings){intcontinuousSignIn=0;intabsence
咔咔咔的
·
2024-08-30 21:39
leetcode
c++
Python:罗马数字转整数
来源:力扣(LeetCode)初始化代码模板:class
Solution
:defromanToInt(self,s:str)->int:解题===============================
程序猿进阶路
·
2024-08-30 20:02
2024年程序员学习
python
开发语言
pcie debug web portal
xilinx.github.io/pcie-debug-kmap/pciedebug/build/html/docs/PCIe_Debug_General_Techniques/index.html34536-Xilinx
Solution
CenterforPCIExpresshttps
斐非韭
·
2024-08-30 20:00
fpga开发
新年计划:Kiki's new year re
solution
图片发自AppKiki'snewyearre
solution
:1.Practicedrawingorpaintingatleasttwiceaweek.每周至少练习两次画画。
月婵娟
·
2024-08-30 19:44
力扣11:链表相交
class
Solution
{public:ListNode*getIntersectionNode(ListNode*headA,Li
不会编程的屁屁桃
·
2024-08-30 18:46
leetcode
链表
算法
算法训练营第48天|LeetCode 198.打家劫舍 213.打家劫舍Ⅱ 337.打家劫舍Ⅲ
LeetCode198.打家劫舍题目链接:LeetCode198.打家劫舍代码:class
Solution
{public:introb(vector&nums){intsize=nums.size();
人间温柔观察者
·
2024-08-30 17:40
算法
leetcode
职场和发展
算法训练营第29天|LeetCode 491.递增子序列 46.全排列 47.全排列Ⅱ
代码:class
Solution
{public:vector>result;vectorpath;voidbacktracking(vector&nums,intstartIndex){if(path.size
人间温柔观察者
·
2024-08-30 17:10
算法
leetcode
职场和发展
打卡第十五天:翻转二叉树、对称二叉树、二叉树的最大深度、二叉树的最小深度
层序遍历亦可递归class
Solution
{public:TreeNode*invertTree(TreeNode*root){if(root==NULL)returnroot
Nothingville0v0
·
2024-08-30 17:08
算法
数据结构
代码随想录——139.单词拆分
class
Solution
{publicbooleanwordBreak(Strings,ListwordDict){HashSetset=newHashSet<>(wordDict);boolean[
cui_hao_nan
·
2024-08-30 13:18
代码随想录
java
算法
开发语言
代码随想录算法训练营第二十一天|二叉树 part8
继续遍历修剪左子树和右子树位于(−∞,low)(-\infty,low)(−∞,low):返回修剪的右子树位于(high,+∞)(high,+\infty)(high,+∞):返回修剪的左子树class
Solution
sagen aller
·
2024-08-30 12:40
算法
力扣刷题:63. 不同路径 II 中等
算法:动态规划class
Solution
{publicintuniquePathsWithObstacles(int[][]obstacleGrid){
小柒阿龙
·
2024-08-30 12:38
算法系列
leetcode
算法
动态规划
Leetcode 15.三数之和
解法:两处去重+二分法class
Solution
:defthreeSum(self,nums:List[int])->List[List[int]]:nums.sort()res=[]visited_numi
普通攻击往后拉
·
2024-08-30 09:17
Python编程
基础算法与数据结构
leetcode
算法
代码随想录算法训练营第二天 | 数组part02:209.长度最小的子数组 ,59.螺旋矩阵II ,区间和,开发商购买土地
209.长度最小的子数组class
Solution
{public:intminSubArrayLen(inttarget,vector&nums){intslow=0,fast=0,size=nums.size
白羊TUT
·
2024-08-30 06:03
算法
矩阵
java
152. 乘积最大子数组
152.乘积最大子数组-力扣(LeetCode)(leetcode-cn.com)class
Solution
{/**思路:求最大值,可以看成求被0拆分的各个子数组的最大值。
了不起的明明
·
2024-08-30 06:44
jsprit学习笔记
jsprit的结果(
solution
)结构如图RuinAndRebuild流程Rebuild流程选取现在还未分配的一个服务点尝试加入每个完整路径中在每个完整路径中选取一段路径进行插入
chengong6006
·
2024-08-30 04:17
测试
git
力扣162.寻找峰值
class
Solution
{publicintfindPeakElement(int[]nums){intlen=nums.length;if(len==1){return0;}if(nums[0]>nums
听风客1
·
2024-08-30 04:16
算法与数据结构入门(java)
算法
排序算法
leetcode
java
(算法)⽐较含退格的字符串————<栈—模拟>
C++算法代码:class
Solution
{public://处理字符串
课堂随笔
·
2024-08-30 01:52
算法——栈
笔记
算法
开发语言
leetcode
数据结构
LetCode 105. 从前序与中序遍历序列构造二叉树
structTreeNode{*intval;*TreeNode*left;*TreeNode*right;*TreeNode(intx):val(x),left(NULL),right(NULL){}*};*/class
Solution
吴贝贝97
·
2024-08-29 23:46
LeetCode
Leetcode 1048. Longest String Chain
文章作者:Tyan博客:noahsnail.com|CSDN|1.DescriptionLongestStringChain2.
Solution
解析:Version1,先根据字符串长度对数组排序,然后根据长度分到不同的组里
SnailTyan
·
2024-08-29 23:13
2020-06-04 88. 合并两个有序数组
代码class
Solution
{publicvoidmerge(int[]nums1,intm,int[]nums2,intn){int[]nu
ls1999
·
2024-08-29 21:12
python中怎么用find查找子串_Python查找第n个子串的技巧分享
Solution
采用嵌套的方法调用find或者index。str_exp=
weixin_39654067
·
2024-08-29 19:17
代码随想录训练营day29|贪心算法part3
加油站力扣题目链接class
Solution
{public:intcanCompleteCircuit(vector&gas,vector&cost){intpre=0;intcur;intresult
aNgler_hdu
·
2024-08-29 17:34
贪心算法
算法
代码随想录算法训练营第二十九天 | 贪心算法 part03
class
Solution
{public:intcanCompleteCircuit(vector&gas,vector&cost){intrestSum=0;intstart=0;intcurSu
sagen aller
·
2024-08-29 17:33
算法
贪心算法
LeetCode Hot100:128、最长连续序列
方案一:哈希表class
Solution
{public:intlongestConsecutive(vector&nums){unordered_setS;for(inti=0;i
心瘾こころ
·
2024-08-29 09:39
leetcode
Hot100
leetcode
哈希算法
散列表
LeetCode Hot100:283、移动零
方案一:双指针class
Solution
{public:voidmoveZeroes(vector&nums){intj=0,cnt=0;//j:现在有用的位置指针//cnt:现在有几个0for(inti
心瘾こころ
·
2024-08-29 09:39
leetcode
Hot100
leetcode
算法
职场和发展
LeetCode Hot100:1、两数之和
方案一:sort+双指针typedefpairPII;class
Solution
{public:vectortwoSum(vector&nums,inttarget
心瘾こころ
·
2024-08-29 09:38
leetcode
Hot100
leetcode
哈希算法
算法
代码随想录算法训练营Day32||Leetcode56. 合并区间、 738.单调递增的数字、
class
Solution
{public:vector>result;vectorpath;staticboolcmp(vector&a,vector&b){if(a[0]==b[0])returna[
jiegongzhu3z
·
2024-08-29 08:06
算法
数据结构
【代码随想录算法训练营第42期 第三十一天 | LeetCode56. 合并区间、738.单调递增的数字】
代码随想录算法训练营第42期第三十一天|LeetCode56.合并区间、738.单调递增的数字一、56.合并区间解题代码C++:class
Solution
{public:vector>merge(vector
天.真
·
2024-08-29 08:06
算法
数据结构
代码随想录算法训练营第九天 | LeetCode 28
class
Solution
{public:voidgetNext(int*next,conststring&s){//j就是前缀串的末尾i
Bingjiaokong
·
2024-08-29 08:05
随想录刷题
leetcode
算法
职场和发展
Leetcode42接雨水(单调栈)
题目题目链接解法一求出前缀最大和后缀最大,用两者较小值减去当前高度,累加即可,这个思路容易想到,这里不赘述class
Solution
{public:inttrap(vector&height){vectorpreMx
我的Doraemon
·
2024-08-29 08:35
Leetcode刷题
算法
Leetcode 22. 括号生成 回溯 C++实现
代码:class
Solution
{public:vectorgenerateParenthesis(intn
重生之我是数学王子
·
2024-08-29 08:05
算法
Leetcode
深度优先
算法
图论
leetcode
c++
数据结构
代码随想录算法训练营第三天 203.移除链表元素、 707.设计链表 、206.反转链表
移除链表元素、707.设计链表、206.反转链表203.移除链表元素代码随想录视频两种方式,一种是有虚拟头结点的,另一种是没有虚拟头结点的没有虚拟头结点需要注意的是删除头结点和非头结点操作方法不一致class
Solution
咸鱼的自我变强之路
·
2024-08-29 04:38
代码随想录_刷题
链表
算法
数据结构
力扣刷题day3
*structListNode{*intval;*ListNode*next;*ListNode(intx):val(x),next(NULL){}*};*/class
Solution
{public:boolhasCycle
CHAO_bismarck
·
2024-08-29 02:18
刷题
leetcode
链表
数据结构
5. 最长回文子串
示例2:输入:"cbbd"输出:"bb"image.pngclass
Solution
{/**分析:通过分析子串的特性回文为奇数时aba中位数两边的数(距离中位数大小一样的时候)相等*回文为偶数时aabb
calm_peng
·
2024-08-28 12:04
leetcode:反转链表
思路:通过计数来找到需要反转的链表左右两侧的节点,反转所需区间,再连接头尾便可只不过处理首位的时候需要考虑特殊情况class
Solution
{publicListNodereverseBetween(ListNodehead
干干淦干干
·
2024-08-28 09:28
java面向对象
Leetcode
力扣1074.元素和为目标值的子矩阵数量
力扣1074.元素和为目标值的子矩阵数量前缀和+哈希表见力扣363.枚举上下边界转化一维前缀和,用哈希表储存出现次数class
Solution
{public:intnumSubmatrixSumTarget
阳光男孩01
·
2024-08-28 09:27
leetcode
矩阵
算法
上一页
7
8
9
10
11
12
13
14
下一页
按字母分类:
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
其他