当前位置:网站首页>剑指 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;
}
};
边栏推荐
猜你喜欢
TCP congestion control details | 2 background
移动应用性能工具探索之路
How to choose the right kubernetes storage plug-in? (09)
linux安装postgresql + patroni 集群问题
畅玩集团冲刺港股:年营收2.89亿 刘辉有53.46%投票权
如何与博格华纳BorgWarner通过EDI传输业务数据?
La boîte de connexion du hub de l'unit é devient trop étroite pour se connecter
几行代码搞定RPC服务注册和发现
L'explosion de John utilise l'encodage d'entrée par défaut: UTF - 8 Loaded 1 password Hash (bcrypt [blowfish 32 / 64 X3])
一文看懂:数据指标体系的4大类型
随机推荐
Résumé de l'entrevue de Dachang Daquan
绿竹生物冲刺港股:年期内亏损超5亿 泰格医药与北京亦庄是股东
LeetCode 4. 寻找两个正序数组的中位数(hard)
大厂面试总结大全
【Leetcode】13. Roman numeral to integer
GeoServer:发布PostGIS数据源
Seal Library - installation and introduction
P6774 [noi2020] tears in the era (block)
大廠面試總結大全
A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits
Dgraph: large scale dynamic graph dataset
jsp 和 servlet 有什么区别?
john爆破出现Using default input encoding: UTF-8 Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
R and rstudio download and installation tutorial (super detailed)
unity Hub 登錄框變得很窄 無法登錄
畅玩集团冲刺港股:年营收2.89亿 刘辉有53.46%投票权
只是巧合?苹果iOS16的神秘技术竟然与中国企业5年前产品一致!
Configure ARP table entry restrictions and port security based on the interface (restrict users' private access to fool switches or illegal host access)
go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
What is the difference between JSP and servlet?