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
算法训练营Day58(单调栈1)
就能感受出单调栈的巧妙class
Solution
:defdailyTemperat
Best,
·
2024-01-27 19:50
数据结构
算法训练营Day59(单调栈2)
503.下一个更大元素II力扣(LeetCode)官网-全球极客挚爱的技术成长平台提醒这道题和739.每日温度几乎如出一辙,可以自己尝试做一做class
Solution
:defnextGreaterElements
Best,
·
2024-01-27 19:49
算法
[晓理紫]每日论文分享(有中文摘要,源码或项目地址)--机器人、强化学习
LLM视觉模型VLM扩散模型视觉导航具身智能,机器人强化学习开放词汇,检测分割==humanrobotinteraction==标题:ChatFailuresandTroubles:Reasonsand
Solution
s
晓理紫
·
2024-01-27 19:37
每日论文
机器人
机器学习
深度学习
代码随想录-数组1(704.二分查找、27.移除元素)
704.二分查找1.暴力解法class
Solution
{public:intsearch(vector&nums,inttarget){for(inti=0;i&nums,inttarget){intleft
weixin_49102363
·
2024-01-27 18:11
算法
leetcode
数据结构
代码随想录 数组-02-移除元素
删除过程如下:class
Solution
{ publicintremoveElement(i
小明菜菜
·
2024-01-27 18:40
代码随想录
算法
leetcode
数据结构
代码随想录 数组-移除元素
题目:27.移除元素初始代码class
Solution
{publicintremoveElement(int[]nums,intval){}}解题思路使用双指针(快慢指针)用非目标元素的值去替代目标元素的位置
森姐最好看
·
2024-01-27 18:39
代码随想录
数据结构
相交链表
思路两条链表长度相减,得到长度之差count,再让长的链表走count步,然后两条链表同时走,即可得到相交的节点publicclass
Solution
{publicListNodegetIn
小白学编程
·
2024-01-27 17:29
leecode_python中档题:73. 矩阵置零
要注意第一行和第一列置零的技巧class
Solution
(object):defsetZeroes(self,matrix):""":typematrix:List[List[int]]:rtype:NoneDonotreturnanything
winnerziqi
·
2024-01-27 17:56
leecode
算法
python
leetcode
数据结构
线性代数
每日一题:73. 矩阵置零
解题思路利用一个rows记录0所在的行数,lie记录0所在的列数然后对着两个list进行遍历对应的每行每列置为0即可代码class
Solution
{publicvoidsetZeroes(int[][]
软件园里卖煎饼
·
2024-01-27 17:26
算法
每日一题 LeetCode 73. 矩阵置零 java题解
但这样会覆盖第一行第一列本身的0,所以我们用两个常量来标记第一行和第一列本身是否有0;代码class
Solution
{publicvoidsetZeroes(int[][]matrix){intm=matrix.length
奔跑的废柴
·
2024-01-27 17:55
LeetCode
leetcode
java
数据结构
算法
DAY31:贪心算法入门455、53、376
Leetcode:455分发饼干一种思路是先把小饼干给小胃口的人时间复杂度:O(nlogn)空间复杂度:O(1)class
Solution
{pub
鴒凰
·
2024-01-27 17:55
leetcode刷题系列
贪心算法
算法
leetcode
c++
笔记
学习
面试经典 150 题 4 —(矩阵)— 73. 矩阵置零
73.矩阵置零方法一class
Solution
{public:voidsetZeroes(vector>&matrix){intm=matrix.size();intn=matrix[0].size()
BreezeChasingDrizzle
·
2024-01-27 17:55
leetcode
矩阵
算法
leetcode
c++
Leetcode 73. 矩阵置零
原题链接:Leetcode73.矩阵置零数组标记:O(m+n)class
Solution
{public:voidsetZeroes(vector>&matrix){intm=matrix.size();
自信的小螺丝钉
·
2024-01-27 17:25
Leetcode
leetcode
矩阵
算法
数据结构
c++
Day 30 | 回溯 332.重新安排行程、 51. N皇后、 37. 解数独 、总结
332.重新安排行程(可跳过)题目文章讲解class
Solution
{privateLinkedListres;privateLinkedListpath=newLinkedListfindItinerary
小小白和纯牛奶
·
2024-01-27 17:53
二月红
java
力扣
Day 29 | 回溯 491.递增子序列 、 46.全排列 、47.全排列 II
hash这种去重方式不需要回溯class
Solution
{List>result=newArrayListpath=newLinkedList>findSubsequences(int[]nums){backTracing
小小白和纯牛奶
·
2024-01-27 17:52
二月红
java
力扣
算法
Day 31 | 贪心算法 理论基础 、455.分发饼干 、 376. 摆动序列 、 53. 最大子序和
理论基础文章讲解455.分发饼干题目文章讲解视频讲解思路:从小饼干开始喂小胃口class
Solution
{publicintfindContentChildren(int[]g,int[]s){Arrays.sort
小小白和纯牛奶
·
2024-01-27 17:48
二月红
贪心算法
算法
LeetCode-70 爬楼梯
1.1阶+1阶+1阶2.1阶+2阶3.2阶+1阶我的ACclass
Solution
(object):defclimbStairs(sel
FlyCharles
·
2024-01-27 16:35
【leetcode】55-跳跃游戏【C/C++】
代码如下:class
Solution
{public:boolcanJump(vector&nums){intl=nums.size();returnbfs_canJump(l,0,nums);}//
Captain_zw
·
2024-01-27 15:49
leetcode算法题库
leetcode150 逆波兰表达式求值
class
Solution
{publicintevalRPN(String[]tokens){Stackstack=newStack<
南方乌鸦
·
2024-01-27 14:04
leetcode
算法
数据结构
代码随想录训练营第三十期|第八天|字符串part01|344.反转字符串● 541. 反转字符串II● 卡码网:54.替换数字● 151.翻转字符串里的单词● 卡码网:55.右旋转字符串
344.反转字符串-力扣(LeetCode)class
Solution
{publicvoidreverseString(char[]s){intleft=0;intright=s.length-1;while
2301_78266314
·
2024-01-27 14:01
代码随想录三刷
算法
代码随想录训练营第三十期|第十五天|二叉树part02|层序遍历 10 ● 226.翻转二叉树 ● 101.对称二叉树 2
层序遍历10102.二叉树的层序遍历-力扣(LeetCode)class
Solution
{publicList>levelOrder(TreeNoderoot){List>res=newArrayListqueue
2301_78266314
·
2024-01-27 14:59
代码随想录三刷
数据结构
算法
力扣:198. 打家劫舍
class
Solution
{publicintrob(int[]nums){intlen=nums.length;//假如只有一间房if(len==1){retu
AnDanXingKo
·
2024-01-27 13:45
动态规划
leetcode
算法
力扣:6. Z 字形变换
class
Solution
{publicStringconvert(Strings,intnumRows){intg=s.length();if(numRows==1||numRows>=g){returns
AnDanXingKo
·
2024-01-27 13:15
数组
leetcode
算法
力扣:4. 寻找两个正序数组的中位数
class
Solution
{publicdoublefindMedianSortedArrays(int[]nums1,int[]nums2){//把两个数组合成一个数组intsize=nums1.length
AnDanXingKo
·
2024-01-27 13:14
数组
算法
数据结构
力扣:209. 长度最小的子数组
class
Solution
{publicintminSubArrayLen(inttarget,int[]nums){//记录子数组和大于target时声明的变量intsum=0;//用于记录最小的连续子数组的长度
AnDanXingKo
·
2024-01-27 13:14
数组
算法
java
小白的首篇LeetCode(国际版)英文题解 - Problem. 70
ClimbingStairs-LeetCodehttps://leetcode.com/problems/climbing-stairs/
solution
s/4586060/why-not-absolu
春玩其华,秋得其实
·
2024-01-27 13:11
Leetcode
刷题
leetcode
算法
职场和发展
力扣hot100 课程表 拓扑序列
Problem:207.课程表文章目录思路复杂度Code思路三叶题解复杂度时间复杂度:O(n+m)O(n+m)O(n+m)空间复杂度:O(n+m)O(n+m)O(n+m)Codeclass
Solution
兑生
·
2024-01-27 13:47
力扣
hot100
leetcode
算法
职场和发展
链表-链表相交
publicclass
Solution
{publicListNodegetIntersectionNode(ListNodeheadA,ListNodeheadB){ListNodecurA=headA
coder_sheep
·
2024-01-27 12:52
算法
链表
数据结构
GitHub国内打不开(解决办法有效)
在hosts文件中添加:#localhostnamere
solution
ishandledwithinDNSitself.#127.0.0.1localhost
Cookie王
·
2024-01-27 12:25
github
LeetCode.206.反转链表
*publicclassListNode{*intval;*ListNodenext;*ListNode(intx){val=x;}*}*/class
Solution
{publicListNodereverseList
Chamberlain T
·
2024-01-27 11:09
LeetCode
#
链表
#
双指针
链表
leetcode
数据结构
算法训练营第六十天打卡|84.柱状图中最大的矩形
目录Leetcode84.柱状图中最大的矩形Leetcode84.柱状图中最大的矩形文章链接:代码随想录文章链接:84.柱状图中最大的矩形思路:暴力双指针,超时class
Solution
{public:
啊就赵得柱
·
2024-01-27 11:24
算法
算法训练营第五十八天|739. 每日温度 496.下一个更大元素 I
目录Leetcode739.每日温度Leetcode496.下一个更大元素ILeetcode739.每日温度文章链接:代码随想录题目链接:739.每日温度思路:暴力解法,时间超限class
Solution
啊就赵得柱
·
2024-01-27 11:54
算法
算法训练营第五十九天|503.下一个更大元素II 42. 接雨水
下一个更大元素IILeetcode42.接雨水Leetcode503.下一个更大元素II文章链接:代码随想录题目链接:503.下一个更大元素II思路:相当于把两个数组拼在一起,用%操作节省时间复杂度class
Solution
啊就赵得柱
·
2024-01-27 11:54
算法
LEETCODE 164破解闯关密码
class
Solution
{public:stringcrackPassword(vector&password){//在比较两个字符串大小时,其实是按照字典序逐个比较它们的字符。
少年芒
·
2024-01-27 10:16
leetcode
算法
力扣hot100 腐烂的橘子 BFS 矢量数组 满注释版
Problem:994.腐烂的橘子文章目录思路复杂度Code思路参考复杂度时间复杂度:O(n)O(n)O(n)空间复杂度:O(n)O(n)O(n)Codeclass
Solution
{int[]dx=newint
兑生
·
2024-01-27 10:09
力扣
hot100
leetcode
宽度优先
算法
[LeetCode 78 / 90] Subsets / Subsets II
LeetCode78SubsetsGivenasetofdistinctintegers,nums,returnallpossiblesubsets(thepowerset).Note:The
solution
setmustnotcontainduplicatesubsets.Example
灰睛眼蓝
·
2024-01-27 09:21
[二叉树专题]二叉树最大高度|n叉树最大高度
一、二叉树最大高度class
Solution
{public:intmaxDepth(TreeNode*root){if(root==nullptr)return0;intleft=maxDepth(root
一只特立独行的猪( ﹡ˆoˆ﹡
·
2024-01-27 09:35
#力扣牛客刷题
算法
数据结构
Leetcode 1 - Two Sum
returnindicesofthetwonumberssuchthattheyadduptoaspecifictarget.Youmayassumethateachinputwouldhaveexactlyone
solution
张桢_Attix
·
2024-01-27 09:28
Datawhole第十五天打卡
示例1:输入:1输出:true解释:2^0=1示例2:输入:16输出:true解释:2^4=16示例3:输入:218输出:falsepublicclass
Solution
{publicboolIsPowerOfTwo
hyh1996
·
2024-01-27 08:02
分组循环A
class
Solution
{publicintmaxPower(Strings){char[]ch=s.toCharArray();inti=0;intn=ch.length;intmax=0;while
lyh20021209
·
2024-01-27 07:16
数据结构与算法
算法
leetcode
java
Day36(10.26)
435无重叠区间class
Solution
:deferaseOverlapIntervals(self,intervals:List[List[int]])->int:ifnotintervals:return0intervals.sort
xzsss
·
2024-01-27 07:57
力扣hot100 岛屿数量 dfs 图论
Problem:200.岛屿数量文章目录思路复杂度Code思路复杂度时间复杂度:O(n)O(n)O(n)空间复杂度:O(1)O(1)O(1)Codeclass
Solution
{intn,m;publicintnumIslands
兑生
·
2024-01-27 06:40
力扣
hot100
leetcode
深度优先
图论
What’s the Functional Design Specification and A Demo
stheFunctionalDesignSpecification(FDS)Purpose:TheFDSisacomprehensivedescriptionofthefunctionalitythatasoftware
solution
mustoffer.Itdetailshowthesoftwareshouldworkandincludesinformationaboutfeature
进击切图仔
·
2024-01-27 06:31
English
学习
笔记
力扣2859-计算k置位下标对应元素的和
计算K置位下标对应元素的和题目链接解题思路对每个下标进行位运算,求得二进制位1的个数,与k进行比较如果相等,证明该元素符合题目要求的值对所有满足要求的值进行累加即可class
Solution
{public
༺❀ൢ望༒月❀ൢ❀
·
2024-01-27 06:43
算法-每日一练
leetcode
算法
职场和发展
第3周 第5天 力扣刷题|树
平衡二叉树 class
Solution
{ public: intGetH(TreeNode*root) { if(root==nullptr) return0; intlen_left
Lei00764
·
2024-01-27 06:12
c++
leetcode
算法
leetcode-2859. 计算 K 置位下标对应元素的和
代码:class
Solution
{p
算法给的安全感
·
2024-01-27 05:35
leetcode刷题日记
leetcode
算法
leetcode两数之和
Givenanarrayofintegersnumsandanintegertarget,returnindicesofthetwonumberssuchthattheyadduptotarget.Youmayassumethateachinputwouldhaveexactlyone
solution
跑马去追XX
·
2024-01-27 05:43
leetcode
数据结构
算法
Leetcode 450. 删除二叉搜索树中的节点
实现代码如下:class
Solution
maplesea7
·
2024-01-27 04:44
leetcode
算法
职场和发展
Leetcode 669. 修剪二叉搜索树
实现代码如下:class
Solution
{publicTreeNode
maplesea7
·
2024-01-27 04:44
leetcode
算法
职场和发展
【力扣刷题练习】160. 相交链表
题目解答:class
Solution
{public:ListNode*getIntersectionNode(ListNode*headA,ListNode*headB){ListNode*A=headA
NaturalHarmonia
·
2024-01-27 03:46
力扣刷题练习
链表
数据结构
上一页
54
55
56
57
58
59
60
61
下一页
按字母分类:
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
其他