剑指offer-19 二叉树的镜像
来源:互联网 发布:折线统计图数据举例 编辑:程序博客网 时间:2024/06/16 10:48
#include <iostream>using namespace std;struct BinaryTreeNode{ int value; BinaryTreeNode* left; BinaryTreeNode* right; BinaryTreeNode(int val) : value(val),left(NULL),right(NULL){}};void MirrorOfBinaryTree(BinaryTreeNode* root){ if(root==nullptr) return ; if(root->left==nullptr || root->right==nullptr) return ; BinaryTreeNode *ptemp = root->left; root->left = root->right; root->right = ptemp; if(root->left) MirrorOfBinaryTree(root->left); if(root->right) MirrorOfBinaryTree(root->right);}int main(){ return 0;}
0 0
- 【剑指offer】二叉树的镜像
- [剑指Offer]二叉树的镜像
- 剑指offer--二叉树的镜像
- 剑指Offer-二叉树的镜像
- 《剑指offer》二叉树的镜像
- 剑指 offer:二叉树的镜像
- 【剑指offer】二叉树的镜像
- 剑指offer 二叉树的镜像
- [剑指offer]二叉树的镜像
- 《剑指offer》-二叉树的镜像
- 剑指Offer:二叉树的镜像
- 剑指offer|二叉树的镜像
- 《剑指offer》二叉树的镜像
- 剑指Offer:二叉树的镜像
- 【剑指offer】二叉树的镜像
- 剑指Offer:二叉树的镜像
- 剑指offer-二叉树的镜像
- 剑指offer 二叉树的镜像
- Fedora21 入门体验笔记
- 三级网络ip
- DirectX9 创建顶点和索引缓存
- 练习随笔
- main(int argc,char *argv[] )参数输入
- 剑指offer-19 二叉树的镜像
- 百度算法更新之后对外链的要求解析
- hdu 1874 畅通工程续
- VMware虚拟机设置centos固定ip地址
- Tomcat相关
- 拷贝构造函数
- 数据结构 - 逻辑结构和存储结构
- UVA - 11258 String Partition
- 【每天十分钟,天天跟我学--excel2010应用大全】2、自定义功能区