当前位置:网站首页>leetcode101. 对称二叉树
leetcode101. 对称二叉树
2022-07-28 21:10:00 【henujolly】
class Solution {
public boolean isSymmetric(TreeNode root) {
return check(root,root);
}
boolean check(TreeNode p,TreeNode q){
if(p==null&&q==null) return true;
if(p==null||q==null) return false;
return (p.val==q.val)&&(check(p.left,q.right))&&(check(p.right,q.left));
}
}
边栏推荐
- Redis related
- How to use sprintf function
- Draem+sspcab [anomaly detection: block]
- Yolov5 improvement 6: add small target detection layer
- JVM -- custom class loader
- OSV_ q Expected all tensors to be on the same device, but found at least two devices, cuda:0
- Reading of "robust and communication efficient federated learning from non-i.i.d. data"
- Learning experience sharing 3: yolov5 training data set path index
- 776. 字符串移位包含问题
- 使用PCL批量显示PCD点云数据流
猜你喜欢

定了!哪吒S全系产品将于7月31日上市发售
![[connect your mobile phone wirelessly] - debug your mobile device wirelessly via LAN](/img/7f/c49fd8c2cbe21585a080852833dcb4.png)
[connect your mobile phone wirelessly] - debug your mobile device wirelessly via LAN

Stm32+ four pin OLED screen + Chinese character mold taking

Paper reading vision gnn: an image is worth graph of nodes

一份来自奎哥的全新MPLS笔记,考IE必看 ----尚文网络奎哥

Reading of "robust and communication efficient federated learning from non-i.i.d. data"

LTE cell search process and sch/bch design

STM32 board level support package for keys

Install PCL and VTK under the background of ROS installation, and solve VTK and PCL_ ROS conflict problem

STM32CUBEIDE(10)----ADC在DMA模式下扫描多个通道
随机推荐
Memseg [anomaly detection: embedded based]
Improvement 13 of yolov5: replace backbone network C3 with lightweight network efficientnetv2
WinForm jump to the second form case
Labelme labels circular objects [tips]
STM32 - external interrupt application (exti) (use cubemx to configure interrupts)
776. String shift inclusion problem
CS flow [abnormal detection: normalizing flow]
[3D target detection] 3dssd (I)
OSV-q The size of tensor a (3) must match the size of tensor b (320) at non-singleton dimension 3
DIP-VBTV: Color Image Restoration Model Combining Deep Image Prior and Vector Bundle Total Variation
UNET [basic network]
Improvement 11 of yolov5: replace backbone network C3 with lightweight network mobilenetv3
shell脚本基础——Shell运行原理+变量、数组定义
Shell script foundation - shell operation principle + variable and array definitions
Introduction to structure
Learning experience sharing 3: yolov5 training data set path index
B站713故障后的多活容灾建设|TakinTalks大咖分享
STM32 - advanced control timer (time base unit, functional block diagram, input, capture, output, open circuit)
Stm32subeide (10) -- ADC scans multiple channels in DMA mode
即将获售高通、联发科芯片,荣耀要超越华为做国内第一?