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
nullptr
day16打卡
day16打卡104.二叉树的最大深度递归法时间复杂度:O(N),空间复杂度:O(N)classSolution{public:intmaxDepth(TreeNode*root){if(root==
nullptr
clamdown2021
·
2024-01-26 21:47
代码
算法
leetcode
数据结构
深度优先
day14打卡
.二叉树的中序遍历145.二叉树的后序遍历递归法前序遍历classSolution{public:vectorans;voidpreorder(TreeNode*root){//出口if(root==
nullptr
clamdown2021
·
2024-01-26 21:47
代码
leetcode
算法
day15打卡
翻转二叉树递归解法:时间复杂度:O(N),空间复杂度:O(N)classSolution{public:TreeNode*invertTree(TreeNode*root){//出口if(root==
nullptr
clamdown2021
·
2024-01-26 21:47
代码
深度优先
算法
leetcode
代码随想录算法训练营第三天|LeetCOde 203.移除链表元素、707.设计链表、206.反转链表
*structListNode{*intval;*ListNode*next;*ListNode():val(0),next(
nullptr
){}*ListNode(intx):val(x),next(
buskin.
·
2024-01-26 21:37
算法
leetcode
链表
C++入门(3)
+11)8.1类型别名思考8.2auto简介8.3auto的使用细则编辑8.3auto不能推导的场景9.基于范围的for循环(C++11)9.1范围for的语法9.2范围for的使用条件10.指针空值
nullptr
阿^觅
·
2024-01-26 20:41
c++
开发语言
Day21 从上到下打印二叉树 + 复杂链表的复制 + 数组中数字出现的次数 II
III.从上到下打印二叉树III(中等)方法一自己搞的最朴素的方法,层序遍历classSolution{public:vector>levelOrder(TreeNode*root){if(root==
nullptr
吃掉夏天的怪物
·
2024-01-26 20:00
C++--入门(内联函数&&auto&&基于范围的for循环&&指针空值
nullptr
)
(C++11)2.1类型别名思考2.2auto简介2.3auto的使用细则2.4auto不能推导的场景3.基于范围的for循环(C++11)3.1范围for的语法3.2范围for的使用条件4.指针空值
nullptr
momo小菜pa
·
2024-01-26 19:38
C++
c++
开发语言
Leetcode—2807. 在链表中插入最大公约数【中等】
*structListNode{*intval;*ListNode*next;*ListNode():val(0),next(
nullptr
){}*ListNode(intx):val(x),next(
源代码•宸
·
2024-01-26 18:05
LeetCode刷题
leetcode
链表
算法
c++
经验分享
数据结构
gcd
C++进阶--C++11入门基础
C++11入门基础一、C++11简介二、统一的列表初始化2.1{}初始化2.2initializer_list容器三、声明3.1auto3.2decltype3.3
nullptr
四、范围for循环4.1
sushang~
·
2024-01-26 16:50
c++
java
算法
【UE5】通过C++代码创建蓝图对象
1.获取蓝图类信息TEXT中填写:Blueprint’蓝图资源引用路径_c’UClass*myClass=StaticLoadClass(ADemoActor::StaticClass(),
nullptr
真鬼123
·
2024-01-26 15:02
UE5
ue5
c++
前端
C++实现STL_List
templatestructList_Node{T_data;List_Node*_next;List_Node*_prev;List_Node(constT&x=T()):_data(x),_next(
nullptr
我的博尔赫斯
·
2024-01-26 14:25
c++
链表
开发语言
C++11
文章目录longlong类型二、char16_t和char32_t类型原始字面量统一的初始化自动推导类型函数模板高级decltype关键字函数后置返回类型模板的别名空指针
nullptr
智能指针explicit
yb0os5
·
2024-01-26 08:55
C++
c++
java
开发语言
**pFrame** 是
nullptr
。报错解决
新建MFC文档并引入OCC环境后,在此基础上二次开发时,总是在某次修改代码出错后,出现这种报错,即使是撤回、再打开无BUG版本的备份都还是会有这个报错,网上似乎也没有准确的解答。于是就抱着试一试的态度自己解决,报错中说是指针访问冲突,本想从根源上看懂OCC提供的这个框架进行修改,但无奈能力有限没找到问题所在最终找到了这个取巧的办法:既然报错这个指针冲突了,那我就加一个判断试试呗,于是我在将*pFr
Raymond_21
·
2024-01-26 07:14
c++
visual
studio
libtorch学习第六
includeusingstd::cout;usingstd::endl;classLinearBnReluImpl:publictorch::nn::Module{private:torch::nn::Linearln{
nullptr
吴天德少侠
·
2024-01-25 21:04
pytorch
学习
pytorch
人工智能
[二叉树专题]二叉树的层次遍历|翻转二叉树|对称二叉树
一、层次遍历classSolution{public:vector>levelOrder(TreeNode*root){vector>result;queueq;if(root==
nullptr
)returnresult
一只特立独行的猪( ﹡ˆoˆ﹡
·
2024-01-25 21:57
算法
数据结构
leetcode
翻转二叉树
classSolution{public:TreeNode*mirrorTree(TreeNode*root){if(root==
nullptr
)returnnullptr;mirrorTree(root
一只特立独行的猪( ﹡ˆoˆ﹡
·
2024-01-25 21:57
算法
leetcode
数据结构
[二叉树专题]前中后递归遍历和非递归遍历
=
nullptr
){p.push_back(root->val);pre(root->left,p);pre(root->right,p);}}vectorpreorderTraversal(TreeNode
一只特立独行的猪( ﹡ˆoˆ﹡
·
2024-01-25 21:26
#力扣牛客刷题
算法
《剑指 Offer》专项突破版 - 面试题 21 : 删除倒数第 n 个节点(C++ 实现)
假设链表中节点的总数为sz,那么1next; } ListNode*prev=
nullptr
; for(inti=0;inext; } ListNode*del; i
melonyzzZ
·
2024-01-25 19:21
数据结构
c++
开发语言
面试
leetcode
算法
【C++】入门(二)
引用使用规则5.3常引用5.4引用的使用场景5.5引用和指针的区别六、内联函数6.1概念6.2内联函数的特性七、auto关键字(C++11)7.1概念7.2使用规则7.3用于for循环(C++11)八、指针空值
nullptr
拉普达的城
·
2024-01-25 08:02
c++
力扣 19.删除链表的倒数第N个结点
*structListNode{*intval;*ListNode*next;*ListNode():val(0),next(
nullptr
){}*ListNode(intx):val(x),next(
凶鼠
·
2024-01-25 02:37
力扣
leetcode
链表
算法
代码随想录 Leetcode111. 二叉树的最小深度
题目:代码(首刷自解2024年1月24日):classSolution{public:intminDepth(TreeNode*root){if(root==
nullptr
)return0;queueque
meeiuliuus
·
2024-01-24 23:33
#
leetcode
---
easy
算法
代码随想录 Leetcode515.在每个树行中找最大值
题目:代码(首刷自解2024年1月24日):classSolution{public:vectorlargestValues(TreeNode*root){vectorres={};if(root==
nullptr
meeiuliuus
·
2024-01-24 23:03
#
leetcode
---medium
算法
windwos 判断文件架构
x320x0020-x64boolget_file_arch(constchar*szdllexe,int&ft){ft=0;FILE*fp=fopen(szdllexe,"r+b");if(fp==
nullptr
CAir2
·
2024-01-24 18:04
C++
随笔
exe
dll
架构
PE
C++11
目录1.C++11简介2.统一的列表初始化2.1{}初始化2.2std::initializer_list3.声明3.1auto3.2decltype3.3
nullptr
4.STL中一些变化5.右值引用和移动语义
唔·西·迪·西
·
2024-01-24 17:32
C++
c++
开发语言
C语言数据管理技术
include#includestructstu{intnum;//学号intage;//年龄structstu*next;};structstu*creat(intn){structstu*head=
nullptr
BraveTomato
·
2024-01-24 12:40
C/C++课程设计
c语言
开发语言
链表
算法
Leetcode—92.反转链表II【中等】
*structListNode{*intval;*ListNode*next;*ListNode():val(0),next(
nullptr
){}*ListNode(intx):val(x),next(
源代码•宸
·
2024-01-24 09:51
LeetCode刷题
leetcode
链表
算法
经验分享
c++
职场和发展
数据结构
牛客月赛86+cf(edu)好题
思路:前缀和+双指针代码:#includeusingnamespacestd;usingi64=int64_t;intmain(){cin.tie(
nullptr
)->sync_with_stdio(false
临江浪怀柔ℳ
·
2024-01-24 07:59
算法
数据结构
C++17新特性(三)新的标准库组件
因此,我们需要一种方法来模拟类似指针的语义:通过
nullptr
表示指针为空。解决方法就是定义该对象的同时再定义一个附加的bool类型来标志该对象有没有值。
CHAK&MING
·
2024-01-24 03:52
C++
c++
开发语言
Leetcode刷题笔记题解(C++):LCR 174. 寻找二叉搜索树中的目标节点
*structTreeNode{*intval;*TreeNode*left;*TreeNode*right;*TreeNode():val(0),left(
nullptr
),right(
nullptr
Demo.demo
·
2024-01-24 00:24
Leetcode算法题解
leetcode
笔记
c++
Leetcode刷题笔记题解(C++):LCR 153. 二叉树中和为目标值的路径
*structTreeNode{*intval;*TreeNode*left;*TreeNode*right;*TreeNode():val(0),left(
nullptr
),right(
nullptr
Demo.demo
·
2024-01-24 00:24
Leetcode算法题解
leetcode
笔记
c++
Leetcode刷题笔记题解(C++):92. 反转链表 II
*structListNode{*intval;*ListNode*next;*ListNode():val(0),next(
nullptr
){}*ListNode(intx):val(x),next(
Demo.demo
·
2024-01-24 00:23
Leetcode算法题解
leetcode
笔记
c++
Leetcode刷题笔记题解(C++):BM11 链表相加(二)
反转求和注意进位运算,求和完成之后再进行反转得到结果/***structListNode{*intval;*structListNode*next;*ListNode(intx):val(x),next(
nullptr
Demo.demo
·
2024-01-24 00:23
Leetcode算法题解
leetcode
笔记
c++
Qt —— 自定义飞机仪表控件(附源码)
源码1qfi_ADI::qfi_ADI(QWidget*parent):QGraphicsView(parent),m_scene(
nullptr
)
信必诺
·
2024-01-23 15:50
Qt
Qt
飞机仪表
QT获取本机网络信息
includeQT_BEGIN_NAMESPACEnamespaceUi{classWidget;}QT_END_NAMESPACEclassWidget:publicQWidget{Q_OBJECTpublic:Widget(QWidget*parent=
nullptr
越甲八千
·
2024-01-23 08:51
【QT】
qt
【leetcode100-038/039/040/041】【二叉树】翻转/对称/直径/层序遍历
classSolution{public:TreeNode*invertTree(TreeNode*root){if(root==
nullptr
)returnroot;TreeNode*temp=root
_六六_
·
2024-01-22 02:02
leetcode100思路整理
算法
数据结构
leetcode
专业课:递归&非递归中序遍历
=
nullptr
){//中序遍历“左孩子--根节点--右孩子”inOrder(root->lchild);printf("%d",root->data
小源同学r
·
2024-01-21 23:14
c++
c语言
算法
面试
数据结构
栈
2、设计在链式存储结构上交换二叉树中所有结点左右子树的算法。
includestructTreeNode{intdata;TreeNode*left;TreeNode*right;//构造,可根据需要删除TreeNode(intval):data(val),left(
nullptr
小源同学r
·
2024-01-21 23:13
算法
数据结构
c++
c语言
面试
【C++算法】构建最优哈夫曼树
include#include#includeusingnamespacestd;templateclassTreeNode{public:TreeNode(constT&value):_parent(
nullptr
爱写代码的刚子
·
2024-01-21 03:38
算法
算法
c++
开发语言
第2章 类型、常量及变量
nullptr
类型nullp
Sanchez·J
·
2024-01-21 02:39
C++从入门到入门
开发语言
c++
1 二叉树遍历
TreeNode*leftChild;TreeNode*rightChild;};TreeNode*createTreeNode(constchar*str){stacks;TreeNode*root=
nullptr
多情刀客无情刀
·
2024-01-21 00:42
代码
c++
算法
开发语言
C++八股文(四)
2)成员变量默认初始化(3)auto关键字用于定义变量,编译器可以自动判断的类型(前提:定义一个变量时对其进行初始化)(4)decltype求表达式的类型(5)智能指针shared_ptr(6)空指针
nullptr
小名王能全
·
2024-01-20 16:24
C++基础
c++
开发语言
八股文
我在代码随想录|写代码Day10之双指针19. 删除链表的倒数第 N 个结点,面试题 02.07. 链表相交,142. 环形链表 II
*structListNode{*intval;*ListNode*next;*ListNode():val(0),next(
nullptr
){}*ListNode(intx):val(x),next(
27dCnc
·
2024-01-20 16:12
链表
数据结构
c++
笔记
算法
173. 二叉搜索树迭代器
*structTreeNode{*intval;*TreeNode*left;*TreeNode*right;*TreeNode():val(0),left(
nullptr
),right(
nullptr
咔咔咔的
·
2024-01-20 12:26
leetcode
c++
114. 二叉树展开为链表
*structTreeNode{*intval;*TreeNode*left;*TreeNode*right;*TreeNode():val(0),left(
nullptr
),right(
nullptr
咔咔咔的
·
2024-01-20 12:56
leetcode
c++
代码随想录算法训练营Day23 | 二叉树part09
classSolution{public:TreeNode*trimBST(TreeNode*root,intlow,inthigh){if(root==
nullptr
)returnnullptr;//
锋_Feng
·
2024-01-20 01:16
算法
c++
leetcode
数据结构
代码随想录算法训练营Day17 | 二叉树part04
classSolution{public:intgetHeight(TreeNode*root){if(root==
nullptr
)return0;intleftHeight=getHeight(root
锋_Feng
·
2024-01-20 01:15
算法
c++
leetcode
数据结构
代码随想录算法训练营Day21 | 二叉树part07
classSolution{public:intresult=INT_MAX;TreeNode*pre=
nullptr
;voidtraversal(TreeNode*root){if(root==
nullptr
锋_Feng
·
2024-01-20 01:44
算法
c++
leetcode
数据结构
1.C++输出当前的时间
读取当前时间#define_CRT_SECURE_NO_WARNINGS#include#include#include#includeintmain(){clock_ttstart;time_tt=time(
nullptr
YANQ662
·
2024-01-19 23:36
9.车辆智能的C++
c++
开发语言
算法
【知识---c++中assert的使用及方法】
=
nullptr
);assert(engine!=
nullptr
);assert(context!
fyc300
·
2024-01-19 08:27
c++
深度学习
人工智能
笔记
linux
c++ 指针的初始化
初始化为
nullptr
从C++11开始,建议初始化未指向任何具体对象的指针为
nullptr
。这是一个特殊的值,代表该指针没有指向任何内存地址。在C++11之前,NULL被用来表示空指针。
淘气の小狼人¹º²⁴
·
2024-01-19 03:43
c++
c++
数据结构
上一页
3
4
5
6
7
8
9
10
下一页
按字母分类:
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
其他