上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 41 下一页
摘要: Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.对这道题直接采用递归遍历树,来判断这两个树是否相同 1 /** 2 * Definition for binary tree 3 * public class TreeNode { 4 * int val; 5 * ... 阅读全文
posted @ 2014-03-31 15:19 weilq 阅读(82) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 41 下一页