当前位置:网站首页>剑指 Offer 27. 二叉树的镜像
剑指 Offer 27. 二叉树的镜像
2022-07-02 14:21:00 【anieoo】
原题链接:剑指 Offer 27. 二叉树的镜像
solution:
class Solution {
public:
TreeNode* mirrorTree(TreeNode* root) {
if(root == NULL) return NULL;
swap(root->left,root->right);
mirrorTree(root->left);
mirrorTree(root->right);
return root;
}
};
边栏推荐
- 福元医药上交所上市:市值105亿 胡柏藩身价超40亿
- 机器学习-感知机模型
- 关于举办科技期刊青年编辑沙龙——新时代青年编辑应具备的能力及提升策略的通知...
- Hard core! One configuration center for 8 classes!
- Masa framework - DDD design (1)
- LeetCode 4. Find the median (hard) of two positive arrays
- 【Leetcode】13. 罗马数字转整数
- TCP congestion control details | 2 background
- A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits
- How openharmony starts FA of remote devices
猜你喜欢
电脑自带软件使图片底色变为透明(抠图白底)
[leetcode] 14. Préfixe public le plus long
Kubernetes three open interfaces first sight
john爆破出现Using default input encoding: UTF-8 Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits
Notice on holding a salon for young editors of scientific and Technological Journals -- the abilities and promotion strategies that young editors should have in the new era
如何与博格华纳BorgWarner通过EDI传输业务数据?
PWM breathing lamp
PhD battle-11 preview | review and prospect backdoor attack and defense of neural network
数字IC手撕代码--投票表决器
随机推荐
【Leetcode】13. Roman numeral to integer
小鹏P7雨天出事故安全气囊没有弹出 官方回应:撞击力度未达到弹出要求
Global and Chinese market of switching valves 2022-2028: Research Report on technology, participants, trends, market size and share
jsp 和 servlet 有什么区别?
LeetCode 2. Add two numbers
linux下配置Mysql授权某个用户远程访问,不受ip限制
vscode设置删除行快捷键[通俗易懂]
john爆破出现Using default input encoding: UTF-8 Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Global and Chinese market of oil analyzers 2022-2028: Research Report on technology, participants, trends, market size and share
Tech talk activity preview | building intelligent visual products based on Amazon kVs
七张图,学会做有价值的经营分析
Privacy computing technology innovation and industry practice seminar: Learning
JS delete substring in string
TCP server communication process (important)
二、mock平台的扩展
Exploration and practice of integration of streaming and wholesale in jd.com
Understand one article: four types of data index system
What is the difference between JSP and servlet?
深度学习图像数据自动标注[通俗易懂]
unity Hub 登錄框變得很窄 無法登錄