当前位置:网站首页>Leetcode101. Symmetric binary tree
Leetcode101. Symmetric binary tree
2022-07-28 22:55: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));
}
}
边栏推荐
- Fastflow [abnormal detection: normalizing flow]
- STM32_ Hal library driven framework
- Summary of common formula notes for solving problems in Higher Mathematics
- Es learning directory
- STM32 - interrupt overview (interrupt priority)
- Bluetooth smart Bracelet system based on STM32 MCU
- Lenovo r9000p installation matlab2018a+cuda10.0 compilation
- OSV_ q AttributeError: ‘numpy. ndarray‘ object has no attribute ‘clone‘
- leetcode101. 对称二叉树
- Improvement 11 of yolov5: replace backbone network C3 with lightweight network mobilenetv3
猜你喜欢

Using PCL to batch display PCD point cloud data flow

《Shortening passengers’ travel time A dynamic metro train scheduling approach using deep reinforcem》

Anomaly detection summary: intensity_ based/Normalizing Flow

从 IPv4 向 IPv6 的迁移

《Shortening passengers’ travel time A dynamic metro train scheduling approach using deep reinforcem》

STM32 -- program startup process

STM32 board level support package for keys

Yolov5 improvement 4: add ECA channel attention mechanism

定了!哪吒S全系产品将于7月31日上市发售

Summary of common formula notes for solving problems in Higher Mathematics
随机推荐
NPM run dev, automatically open the browser after running the project
winform跳转第二个窗体案例
Simple es highlight practice
C language to realize string reverse order arrangement
简单的es高亮实战
MySQL foundation - advanced functions
leetcode 199. 二叉树的右视图
Summary of common formula notes for solving problems in Higher Mathematics
Fastflow [abnormal detection: normalizing flow]
一份来自奎哥的全新MPLS笔记,考IE必看 ----尚文网络奎哥
Stm32subeide (10) -- ADC scans multiple channels in DMA mode
Symbol符号类型
软件测试面试笔试题及答案(软件测试题库)
es个人整理的相关面试题
【复制】互联网术语、简称、缩写
【三维目标检测】3DSSD(二)
PC side web page special effects (offset series, obtain the coordinates of the mouse in the box, pop-up drag effect, magnifying glass effect)
A simple neural network model based on MLP full connection layer
es学习目录
Find out the maximum value of all indicators in epoch [tips]