遞歸實現:二叉樹鏡像

 題目描述:給出一棵二叉樹,求它的鏡像,如下圖:右邊是二叉樹是左邊二叉樹的鏡像。   public class exercise { public void Mirror(TreeNode root) { if(root == null) return; if(root.left == null && root.right == nu
相關文章
相關標籤/搜索