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
【力扣刷题练习】103. 二叉树的锯齿形层序遍历
题目解答:class
Solution
{public:vector>zigzagLevelOrder(TreeNode*root){queueq;if(root!
NaturalHarmonia
·
2024-01-27 03:45
力扣刷题练习
leetcode
算法
数据结构
【力扣刷题练习】54. 螺旋矩阵
题目解答:class
Solution
{public:vectorspiralOrder(vector>&matrix){if(matrix.empty())return{};intl=0,r=matrix
NaturalHarmonia
·
2024-01-27 03:45
力扣刷题练习
leetcode
矩阵
算法
【力扣刷题练习】21. 合并两个有序链表
新链表是通过拼接给定的两个链表的所有节点组成的题目解答:1.递归解法class
Solution
{public:ListNode*mergeTwoLists(ListNode*list1,ListNode
NaturalHarmonia
·
2024-01-27 03:15
力扣刷题练习
leetcode
链表
算法
【力扣刷题练习】236. 二叉树的最近公共祖先
题目解答:class
Solution
{public:TreeNode*lowestCommonAncestor(TreeNode*root,TreeNode*p,TreeNode
NaturalHarmonia
·
2024-01-27 03:15
力扣刷题练习
leetcode
算法
数据结构
【力扣刷题练习】912. 排序数组
题目描述:给你一个整数数组nums,请你将该数组升序排列题目解答:class
Solution
{public:vectorsortArray(vector&nums){intlen=nums.size()
NaturalHarmonia
·
2024-01-27 03:15
力扣刷题练习
算法
数据结构
leetcode
Comparison between IPQ9574 and IPQ9554 | MLO EHT
Solution
Unveils the WiFi 7 CPU for Industrial
ComparisonbetweenIPQ9574andIPQ9554|MLOEHTWiFi7Qualcomm
Solution
UnveilstheWiFi7CPUforIndustrialApplications-AlderSeriesWi-Fi7elevateswirelessexperiencesandwillaccelerateemergingusecaseswithitsextremedat
wallyslilly
·
2024-01-27 03:31
linux
5G
90、LeetCode之Subsets II 题解
Givenacollectionofintegersthatmightcontainduplicates,nums,returnallpossiblesubsets(thepowerset).Note:The
solution
setmustnotcontainduplicatesubsets.Forexample
guoweikuang
·
2024-01-27 01:43
[LeetCode] 406. Queue Reconstruction by Height (medium)
class
Solution
{pu
弱花
·
2024-01-27 01:40
leetcode :二叉树的前中后序遍历非递归实现,以及根据前中后序构造二叉树
structTreeNode{*intval;*TreeNode*left;*TreeNode*right;*TreeNode(intx):val(x),left(NULL),right(NULL){}*};*/class
Solution
le119126
·
2024-01-27 00:23
数据结构
算法
leetcode
二叉树
77. Combinations
image.png典型的dfs+回溯class
Solution
{public:vector>combine(intn,intk){vector>result;vectorlist;if(n==0)returnresult
刘小小gogo
·
2024-01-27 00:07
力扣题:链表的合并-10.17
#classListNode(object):#def__init__(self,val=0,next=None):#self.val=val#self.next=nextclass
Solution
(object
yu~~~
·
2024-01-27 00:50
leetcode
链表
力扣:链表的合并
class
Solution
{public:ListNode*mergeTw
迷你猪@123
·
2024-01-27 00:19
链表
数据结构
算法
剑指offer——矩阵中的路径C++
class
Solution
{public://此字符串不是二级指针,不会改变原来的值,所以不用erase尾部//传的是一个数组,其实相当于传进去一个指向数组首部地址的指针
baixiaofei567
·
2024-01-26 23:19
剑指Offer
#
图
#
回溯算法
字符串
dfs
回溯算法
剑指offer
力扣217:存在重复元素
归并排序力扣(LeetCode)官网-全球极客挚爱的技术成长平台class
Solution
{publicbooleancontainsDuplicate(int[]nums){booleanflag=false
码见愁的小弟
·
2024-01-26 23:14
leetcode
算法
排序算法
力扣20:有效的括号
力扣(LeetCode)官网-全球极客挚爱的技术成长平台用栈解决class
Solution
{publicbooleanisValid(Strings){if(s.length()==0){returntrue
码见愁的小弟
·
2024-01-26 23:14
算法
力扣22:括号的生成
力扣(LeetCode)官网-全球极客挚爱的技术成长平台class
Solution
{publicListgenerateParenthesis(intn){Listresult=newArrayListresult
码见愁的小弟
·
2024-01-26 23:14
leetcode
算法
职场和发展
力扣101(对称二叉树)
力扣(LeetCode)官网-全球极客挚爱的技术成长平台class
Solution
{publicbooleanisSymmetric(TreeNoderoot){if(root==null){returntrue
码见愁的小弟
·
2024-01-26 23:44
leetcode
算法
职场和发展
力扣215(找出数组中第k大的值)
力扣(LeetCode)官网-全球极客挚爱的技术成长平台class
Solution
{publicintfindKthLargest(int[]nums,intk){//利用堆解决://1.向小顶堆放入前
码见愁的小弟
·
2024-01-26 23:43
leetcode
算法
java
力扣145(前中后二叉树的遍历)
力扣(LeetCode)官网-全球极客挚爱的技术成长平台class
Solution
{publicListpostorderTraversal(TreeNoderoot){Listlist=newArrayList
码见愁的小弟
·
2024-01-26 23:43
leetcode
算法
职场和发展
刷题03 数组mid
class
Solution
{public:intcountWords(vector&words1,vector&words2){unordered_mapf1,f2;for(stringstr:words1
hndgfnd
·
2024-01-26 22:23
leetcode刷题打卡
算法
数据结构
leetcode
CF1349F1 Slime and Sequences (Easy Version) 题解
Description传送门
Solution
Part1:性质观察遇到这种输入量非常小的题,我们往往会想到找规律。先用暴力打个表出来试试吧。
_ducati
·
2024-01-26 22:51
动态规划
排序算法
算法
Leetcode---1716. 计算力扣银行的钱
class
Solution
{publicinttotalMoney(intn){intstart=1;intsum=0;while(n>=7){n-=7;sum=sum+((start+start+6)
花园宝宝胡图图
·
2024-01-26 22:19
leetcode
leetcode
算法
职场和发展
关于层序遍历的十道题,续day15
关于层序遍历的十道题102.二叉树的层序遍历时间复杂度:O(N),空间复杂度:O(N)第一想法:使用队列遍历每一层即可困难:没有使用固定size,因为q.size是不断变化的class
Solution
{
clamdown2021
·
2024-01-26 21:17
代码
leetcode
算法
day16打卡
day16打卡104.二叉树的最大深度递归法时间复杂度:O(N),空间复杂度:O(N)class
Solution
{public:intmaxDepth(TreeNode*root){if(root==nullptr
clamdown2021
·
2024-01-26 21:47
代码
算法
leetcode
数据结构
深度优先
day14打卡
day14打卡144.二叉树的前序遍历94.二叉树的中序遍历145.二叉树的后序遍历递归法前序遍历class
Solution
{public:vectorans;voidpreorder(TreeNode
clamdown2021
·
2024-01-26 21:47
代码
leetcode
算法
day15打卡
day15打卡226.翻转二叉树递归解法:时间复杂度:O(N),空间复杂度:O(N)class
Solution
{public:TreeNode*invertTree(TreeNode*root){//出口
clamdown2021
·
2024-01-26 21:47
代码
深度优先
算法
leetcode
代码随想录算法训练营第二天| LeetCode 977.有序数组的平方、209.长度最下的子数组、59.螺旋矩阵
977.有序数组的平方-力扣(LeetCode)暴力解法class
Solution
{public:vectorsortedSquares(vector&nums){for(inti=0;isortedSquares
buskin.
·
2024-01-26 21:37
算法
leetcode
矩阵
代码随想录算法训练营打卡day1 |704. 二分查找,27. 移除元素
一、LeetCode704二分查找题目链接:704.二分查找解法一:左闭右闭class
Solution
{publicintsearch(int[]nums,inttarget){intleft=0,right
橙南花已开
·
2024-01-26 21:06
代码随想录算法训练营
算法
java
代码随想录算法训练营第一天| LeetCode704. 二分查找、27. 移除元素
LeetCode704.二分查找704.二分查找-力扣(LeetCode)class
Solution
{public:intsearch(vector&nums,inttarget){intmin=0;intmax
buskin.
·
2024-01-26 21:36
算法
leetcode
160. 相交链表(python3)
Problem:160.相交链表思路参考:哈希表:https://leetcode.cn/problems/intersection-of-two-linked-lists/
solution
s/811625
Syntax_CD
·
2024-01-26 21:26
LeetCode精选
链表
数据结构
哈希算法
leetcode
python
128. 最长连续序列 (Python3)
Problem:128.最长连续序列思路参考:https://leetcode.cn/problems/longest-consecutive-sequence/
solution
s/276931/zui-chang-lian-xu-xu-lie-by-leetcode-
solution
Syntax_CD
·
2024-01-26 21:25
LeetCode精选
哈希算法
算法
python
leetcode
LeetCode 21.合并两个有序链表(python版)
1,3,4]输出:[1,1,2,3,4,4]代码classListNode:def__init__(self,val=0,next=None):self.val=valself.next=nextclass
Solution
奋斗哼哼
·
2024-01-26 20:54
leetcode
链表
python
算法
LeetCode 14.最长公共前缀(python版)
代码class
Solution
():defmax_common(self,strs):ifnotstrs:#如果数组
奋斗哼哼
·
2024-01-26 20:24
leetcode
python
算法
开发语言
Day21 从上到下打印二叉树 + 复杂链表的复制 + 数组中数字出现的次数 II
一、剑指Offer32-III.从上到下打印二叉树III(中等)方法一自己搞的最朴素的方法,层序遍历class
Solution
{public:vector>levelOrder(TreeNode*root
吃掉夏天的怪物
·
2024-01-26 20:00
Leetcode DAY2:有序数组的平方 长度最小的子数组 螺旋矩阵
977.有序数组的平方(1)暴力class
Solution
: def sortedSquares(self, nums: List[int]) -> List[int]: n =
Petal990912
·
2024-01-26 20:50
leetcode
矩阵
算法
代码随想录day02| 有序数组的平方|长度最小的子数组|螺旋矩阵II
class
Solution
{public:vectors
晴贺
·
2024-01-26 20:19
算法
leetcode
数据结构
c++
c语言
10. Regular Expression Matching 2019-03-13
下面贴出代码class
Solution
{publicbooleanisMatch(Strings,Stringp){if(p.length()==0){returns.length(
Thinker_Lin
·
2024-01-26 19:06
LeetCode:670. 最大交换(Java 贪心)
注意:给定数字的范围是[0,108]实现代码与解析;贪心class
Solution
{publicintmaximumSwa
Cosmoshhhyyy
·
2024-01-26 19:24
LeetCode
leetcode
算法
职场和发展
Leetcode—2942. 查找包含给定字符的单词【简单】
2023每日刷题(一零一)Leetcode—2942.查找包含给定字符的单词实现代码class
Solution
{public:vectorfindWordsContaining(vector&words
源代码•宸
·
2024-01-26 18:35
LeetCode刷题
leetcode
算法
职场和发展
经验分享
c++
字符串
Leetcode—剑指Offer LCR 083. 全排列【中等】
2023每日刷题(一零二)Leetcode—LCR083.全排列实现代码class
Solution
{public:vector>permute(vector&nums){vector>ans;intn=
源代码•宸
·
2024-01-26 18:35
LeetCode刷题
leetcode
算法
职场和发展
c++
经验分享
回溯
dfs
Leetcode—2769. 找出最大的可达成数字【简单】
2023每日刷题(一百)Leetcode—2769.找出最大的可达成数字实现代码class
Solution
{public:inttheMaximumAchievableX(intnum,intt){returnnum
源代码•宸
·
2024-01-26 18:32
LeetCode刷题
leetcode
算法
职场和发展
经验分享
c++
牛客周赛 Round 29 A---E
solution
判断数字的大小code#include#include#includeusingnamespacestd;typedeflonglongll;lla,b;intmain(){cin>>a
子衿h
·
2024-01-26 18:42
牛客
算法
数据结构
c++
初读《TRIZ理论及应用》
TRIZ是俄文TPH3(标示不会写俄文)的英文音译TeoriyaResheniyaIzobreatatelskikhZadatch的缩写,其英文全称为Theoryofthe
Solution
ofInventiveProblems
张建行_7739
·
2024-01-26 18:18
python下载资源文件:zenodo中的数据集
简介最近看见一篇论文:《AfirstChinesebuildingheightestimateat10mre
solution
(CNBH-10m)usingmulti-sourceearthobservationsandmachinelearning
孝钦显皇后给过版权费了
·
2024-01-26 17:29
python
算法训练营Day56(动态规划16)
两个字符串的删除操作力扣(LeetCode)官网-全球极客挚爱的技术成长平台提醒本题和动态规划:115.不同的子序列相比,其实就是两个字符串都可以删除了,情况虽说复杂一些,但整体思路是不变的class
Solution
Best,
·
2024-01-26 17:13
动态规划
算法
算法训练营Day57(动态规划17)
647.回文子串力扣(LeetCode)官网-全球极客挚爱的技术成长平台提醒动态规划解决的经典题目,如果没接触过的话,别硬想直接看题解class
Solution
:defcountSubstrings(self
Best,
·
2024-01-26 17:13
算法
动态规划
算法训练营Day55(动态规划15)
392.判断子序列力扣(LeetCode)官网-全球极客挚爱的技术成长平台提醒这道题目算是编辑距离问题的入门题目(毕竟这里只是涉及到减法),慢慢的,后面就要来解决真正的编辑距离问题了class
Solution
Best,
·
2024-01-26 17:10
动态规划
算法
leetcode1237. 找出给定方程的正整数解
1237.找出给定方程的正整数解https://leetcode.cn/problems/find-positive-integer-
solution
-for-a-given-equation/难度中等
时雨h
·
2024-01-26 17:21
数据结构
C++
算法
算法
算法题。基本计算器
publicclass
Solution
{publicintcalculate(Strings){//使用栈保存当前操作的符号Dequeops=newLinkedList();ops.push(1);//
呆咖啡
·
2024-01-26 16:32
算法
java
python实现leetcode之93. 复原 IP 地址
解题思路取了四部分并且取完,就算是成功的划分方式93.复原IP地址代码class
Solution
:defrestoreIpAddresses(self,s:str)->List[str]:defh(ip
深圳都这么冷
·
2024-01-26 15:45
上一页
55
56
57
58
59
60
61
62
下一页
按字母分类:
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
其他