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
2809. 使数组和小于等于 x 的最少时间
envType=daily-question&envId=2024-01-19经典动态规划class
Solution
{public:intminimumTime(vector&nums1,vec
云儿乱飘
·
2024-01-20 07:10
#
动态规划经典
算法
dp
不同路径 II-力扣LeetCode 63题C++版
在给定障碍物的二维数组中求解(不新建二维数组,leetcode:时间击败100%用户,内存击败95.57%用户)注释版代码:class
Solution
{public:intuniquePathsWithObstacles
缄默0603
·
2024-01-20 07:05
LeetCode
leetcode
c++
算法
AWS 专题学习 P5 (Classic SA、S3)
文章目录Classic
Solution
sArchitecture无状态Web应用程序:WhatIsTheTime.com背景&目标架构演进Well-Architected5pillars有状态的Web应用程序
喵王叭
·
2024-01-20 07:17
云计算
aws
云计算
Leetcoder Day12| 二叉树 part02
队列先进先出,符合一层一层遍历的逻辑class
Solution
{publicList>levelOrder(TreeNoderoot){List>result=newArrayList>();//存放结果
恩爱鹿皮er
·
2024-01-20 07:47
算法
算法随想录第四十一天打卡|343. 整数拆分 , 96.不同的二叉搜索树
class
Solution
(object):defintegerBreak(self,n):dp=[0
星曜366
·
2024-01-20 07:03
算法
算法随想录第三十九天打卡|62.不同路径 , 63. 不同路径 II
|LeetCode:62.不同路径_哔哩哔哩_bilibiliclass
Solution
(object):defuniquePaths(self,m,n):ifm==1andn==1:return1dp
星曜366
·
2024-01-20 06:30
算法
976. 三角形的最大周长
题目:LeetCode976.三角形的最大周长代码:class
Solution
{publicintlargestPerimeter(int[]A){Arrays.sort(A);for(inti=A.length
踏遍三十六岸
·
2024-01-20 06:24
算法
leetcode
职场和发展
7. 整数反转
我的方法一边界反转后的数可能INT越界代码class
Solution
{public:intreverse(
gykimo
·
2024-01-20 06:17
Leetcode 两整数之和
Solution
计算机位运算class
Solution
{publicintgetSum(inta,intb){if(b==0)returna;intsum=a^b;intcarry=(a&b)<&
泡泡爱上巧克力_7122
·
2024-01-20 06:53
每日温度00
来代替解答思路利用栈先进后出的特点将低温度的下标存储到栈中,如果当前温度比栈顶下标对应温度更高,则不断将栈顶元素出栈,并不断更新结果中栈顶下标的值(也就是当前温度的下标),直到当前温度不高于栈顶温度为止,以上操作会保证栈中元素是递减的代码class
Solution
青釉Oo
·
2024-01-20 05:12
算法
数据结构
算法
leetcode
java
力扣:844.比较含退格的字符串
官方给了两种①:用栈②:双指针栈代码如下:class
Solution
{public:boolbackspaceCompare(strings,stringt){returnbuild(s)==build
empty__barrel
·
2024-01-20 04:02
数组
#
数组2
leetcode
算法
职场和发展
力扣算法题 Python3实现
我的办法:滑动窗口+局部最优解class
Solution
:deflengthOfLongestSubstring(self,s:str)->in
ZhenxiangChen
·
2024-01-20 04:32
Leetcode
python
leetcode
算法
代码随想录算法训练营第六天| 242 有效的字母异位词 349 两个数组的交集 202 快乐数 1 两数之和
目录242有效的字母异位词349两个数组的交集202快乐数1两数之和242有效的字母异位词排序class
Solution
{public:boolisAnagram(strings,stringt){sort
魔法恐龙: )
·
2024-01-20 04:49
LeetCode
算法
SARS-CoV-2抗体检测的潜在假阳性原因及其解决方案
Potentialfalse‐positivereasonsforSARS‐CoV‐2antibodytestingandits
solution
根据其来源,SARS-CoV-2抗体检测假阳性的原因可分为内源性因素和外源性因素
Serissajaponica
·
2024-01-20 03:30
树
1.树的高度MaximumDepthofBinaryTree(Easy)1.1题目11.2分析解答class
Solution
{publicintmaxDepth(TreeNoderoot){if(root
奔向星辰大海
·
2024-01-20 03:50
力扣59-螺旋矩阵
螺旋矩阵题目链接class
Solution
{public:vector>generateMatrix(intn){vector>res(n,vector(n,0));intdx[4]={0,1,0,-1
༺❀ൢ望༒月❀ൢ❀
·
2024-01-20 03:40
算法-每日一练
leetcode
矩阵
算法
101. 对称二叉树
1/\22/\/\3443但是下面这个[1,2,2,null,3,null,3]则不是镜像对称的:1/\22\\33代码class
Solution
{public:boolisSymmetric(TreeNode
vbuer
·
2024-01-20 03:02
代码随想录算法训练营第二十一天| 530.二叉搜索树的最小绝对差、501.二叉搜索树中的众数、236. 二叉树的最近公共祖先
530.二叉搜索树的最小绝对差题目链接:力扣(LeetCode)官网-全球极客挚爱的技术成长平台解题思路:中序遍历,当前值减去前一个值,不断更新最小差值java:class
Solution
{TreeNodepre
麦城稻香咖啡
·
2024-01-20 02:30
算法
代码随想录算法训练营第十五天| 层序遍历、226.翻转二叉树、101. 对称二叉树
-力扣(LeetCode)解题思路:深度优先遍历用deep标记层数,广度优先遍历用队列实现java:class
Solution
{publicList>resList=newArrayList>();publicList
麦城稻香咖啡
·
2024-01-20 02:59
算法
深度优先
代码随想录算法训练营第二十四天| 77. 组合
77.组合题目链接:力扣(LeetCode)官网-全球极客挚爱的技术成长平台解题思路:纵向遍历,遇到叶子节点返回上一节点java:class
Solution
{List>result=newArrayListpath
麦城稻香咖啡
·
2024-01-20 02:57
算法
LeetCode 395.Longest Substring with At Least K Repeating Characters(至少有K个重复字符的最长子串) 分治/滑动窗口/medium
文章目录1.Description2.Example3.
Solution
2.滑动窗口1.Description给你一个字符串s和一个整数k,请你找出s中的最长子串,要求该子串中的每一字符出现次数都不少于
押切徹
·
2024-01-20 02:10
LeetCode
滑动窗口/双指针
分治
java
leetcode395 Longest Substring with At Least K Repeating Characters
实现:1#include2usingnamespacestd;3class
Solution
4{5public:6intlongestSubstring(strings,intk
weixin_30456039
·
2024-01-20 02:09
*Leetcode 395. Longest Substring with At Least K Repeating Characters
一个不太难的题,不算dp,最早写的一版200多ms才A掉constintSZ=26;class
Solution
{public:intlongestSubstring(strings,intt){if(!
Z-Pilgrim
·
2024-01-20 02:09
Leetcode算法题395. Longest Substring with At Least K Repeating Characters
原题链接分治算法class
Solution
{//分治算法publicintlongestSubstring(Strings,intk){//如果string的长度小于k,那么必不包含重复出现k次及以上的字母
努力不停努力
·
2024-01-20 02:38
Leetcode算法题
数据结构与算法
算法
leetcode
字符串
java
代码随想录算法训练营Day28|93.复原IP地址、78.子集、90.子集II
算法实现class
Solution
{private:vectorresult;voidbacktracking(string&s,intsta
张金卓2023
·
2024-01-20 01:17
算法
代码随想录算法训练营Day29|491.递增子序列、46.全排列、47.全排列 II
算法实现class
Solution
{private
张金卓2023
·
2024-01-20 01:17
算法
数据结构
leetcode
代码随想录算法训练营Day20 | 二叉树part06
注意区间是左闭右开class
Solution
{public:TreeNode*traversal(vector&nums,intleft,intright){if(left>=right)returnnullptr
锋_Feng
·
2024-01-20 01:16
算法
c++
leetcode
数据结构
代码随想录算法训练营Day22 | 二叉树part08
递归法class
Solution
{public:TreeNode*lowestCommonAncestor(TreeNode*root,TreeNode*p,TreeNode
锋_Feng
·
2024-01-20 01:16
算法
c++
leetcode
数据结构
代码随想录算法训练营Day23 | 二叉树part09
class
Solution
{public:TreeNode*trimBST(TreeNode*root,intlow,inthigh){if(root==nullptr)returnnullptr;//
锋_Feng
·
2024-01-20 01:16
算法
c++
leetcode
数据结构
代码随想录算法训练营Day17 | 二叉树part04
class
Solution
{public:intgetHeight(TreeNode*root){if(root==nullptr)return0;intleftHeight=getHeight(root
锋_Feng
·
2024-01-20 01:15
算法
c++
leetcode
数据结构
代码随想录算法训练营Day1 | 数组part 01
704.二分查找leetcode链接代码随想录链接思路使用左闭右闭的区间[left,right]class
Solution
{public:intse
锋_Feng
·
2024-01-20 01:45
算法
c++
leetcode
代码随想录算法训练营Day21 | 二叉树part07
class
Solution
{public:intresult=INT_MAX;TreeNode*pre=nullptr;voidtraversal(TreeNode*root){if(root==nullptr
锋_Feng
·
2024-01-20 01:44
算法
c++
leetcode
数据结构
力扣36. 有效的数独
subboxes[i][j][val]用于存储第i行、第j列个小九宫格val+1的个数,其中:i=r/3,j=c/3遍历每个小格子,统计数字的个数,分别计入对应的哈希表里,如果个数超过了1,则数独无效class
Solution
slowfastflow
·
2024-01-20 00:06
力扣实践
leetcode
数据结构
算法
【CF比赛记录】 —— Codeforces Round 920 (Div. 3)(A、B、C、D)
2.
Solution
//ht
PH_modest
·
2024-01-20 00:06
CF比赛记录
c语言
开发语言
codeforces
c++
算法
古老的rem适配方案
1.切图的时候按照视觉稿自身分辨率来切2.加上如下JS代码(function(doc,win,ideaWidth){//分辨率Re
solution
适配vardocEl=doc.documentElement
草珊瑚_6557
·
2024-01-20 00:52
不含重复字符的最长子字符串leetcode,c++
滑动窗口类型题目;left和right就是right找不重复的放到occ;遇到重复的删除occ最左边的也就是放在occ的s[left];right和left之间的长度是不重复的字符串长度;答案class
Solution
Game Changer
·
2024-01-20 00:57
c++每日一题leetcode
leetcode
c++
算法
反转字符串Ⅱ
题目描述541.反转字符串II-力扣(LeetCode)解答class
Solution
{public:stringreverseStr(strings,intk){for(inti=0;is.size(
Game Changer
·
2024-01-20 00:57
c++每日一题leetcode
leetcode
算法
反转字符串中的单词c++
题目描述解题start来找每个单词;end和idx在start找到单词后,开始重新摆放顺序,s[idx]是最后的结果;单词之间的空格也由idx来控制;class
Solution
{public:stringreverseWords
Game Changer
·
2024-01-20 00:57
c++每日一题leetcode
c++
leetcode
R语言【paleobioDB】——pbdb_temporal_re
solution
():展示化石数据的时空分辨率
Usagepbdb_temporal_re
solution
(data,do.plot=TRUE)Arguments参数【d
ALittleHigh
·
2024-01-19 23:56
paleobioDB
r语言
开发语言
LeetCode 算法题 1.两数之和(python版)
代码class
Solution
():#定义一个函数实现该功能,遍历数组,去除其第一个元素,将目标值减去该元素,得到的结果与#裁减掉该元素的列表去匹配,如果结果在裁剪后的列表中,则返回
奋斗哼哼
·
2024-01-19 23:55
算法
leetcode
python
LeetCode 算法 3.无重复字符的最长子串(python版)
2.代码class
Solution
:deflength_substring(self,str):#如果字符串为空,直接返回0ifnotstr:return0
奋斗哼哼
·
2024-01-19 23:55
算法
leetcode
python
C++ 之LeetCode刷题记录(十二)
class
Solution
{public:intmySqrt(intx){if(x==1||x==0){returnx;}intleft=0;
icecream_cheese
·
2024-01-19 22:11
数据结构
c++
c++
leetcode
开发语言
代码随想录算法训练营第八天| 344.反转字符串、541. 反转字符串II、卡码网:54.替换数字 、 151.翻转字符串里的单词、卡码网:55.右旋转字符串
双指针、三数之和、四数之和、剪枝去重最重要的收获是如何适当的去重344.反转字符串思路:1、相向指针向内交换代码实现class
Solution
{public:voidreverseString(vector
heitong_fu
·
2024-01-19 20:20
算法
代码随想录算法训练营第六天| 哈希表理论基础、242.有效的字母异位词、349. 两个数组的交集、202. 快乐数、1. 两数之和
有效的字母异位词固定类别的存储内查找用固定大小的vector;思路:1、26种英文字符分别记录两字符串中各种字符的数量;2、若两字符串相互抵消,则最终vector元素全为0固定大小的vectorclass
Solution
heitong_fu
·
2024-01-19 20:50
算法
哈希算法
代码随想录算法训练营第九天|28. 实现 strStr() 、459.重复的子字符串
2、KMP(在一个长串中查找是否出现过另一个串)暴力法代码实现class
Solution
{public:intstrStr(stringhaystack,stringneedle){intindex=-
heitong_fu
·
2024-01-19 20:18
算法
只出现一次的数字
示例1:输入:[2,2,1]输出:1示例2:输入:[4,1,2,1,2]输出:4思路1对数组排序,对其相邻的数进行判断是否判断,因为重复的数只出现两次,所以i+2,直接跳到第三个数,接着判断class
Solution
小白学编程
·
2024-01-19 19:25
ARP、RARP 协议
搜索:不要偏旁的拒绝ARP协议AddressRe
solution
Protocol地址解析协议,工作在MAC层,用于获得已知IP地址的MAC地址。
lopowh
·
2024-01-19 19:43
网络基础知识
网络
linux
运维
Linux内核高精度定时器hrtimer 使用实例
内核高精度定时器hrtimer使用实例一、内核为高精度定时器重新设计了一套软件架构,它可以为我们提供纳秒级的定时精度,以满足对精确时间有迫切需求的应用程序或内核驱动,以下学习使用hrtimer(highre
solution
timer
三火哥
·
2024-01-19 18:05
android驱动
高精度定时器hrtimer
Linux内核hrtimer高精度定时器介绍及使用
因此linux社区设计了hrtimer(HighRe
solution
Timer,高精度定时器)子系统,提供纳秒级别的时钟精度。2.定义高精度定时器路径:kernel5.4/include/
倾听悦歌
·
2024-01-19 18:02
传感器
linux
c语言
驱动开发
Linux内核高精度定时器hrtimer
内核高精度定时器hrtimer一、内核为高精度定时器重新设计了一套软件架构,它可以为我们提供纳秒级的定时精度,以满足对精确时间有迫切需求的应用程序或内核驱动,下面简单介绍下hrtimer(highre
solution
timer
Mar`
·
2024-01-19 18:02
linux
linux
运维
服务器
上一页
64
65
66
67
68
69
70
71
下一页
按字母分类:
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
其他