LintCode 469 [Identical Binary Tree] 原题 检查两棵二叉树是否等价。等价的意思是说,首先两棵二叉树必须拥有相同的结构,并且每个对应位置上的节点上的数都相等。 样例 就是两棵等价的二叉树。 就不是等价的。 解题思路 如果两棵树都是None,认为是等价的 Recursion - 递归求解,分治的思路,如果a.val == b...
When I started this project, I didn't know a stack from a heap, didn't know Big-O anything, anything about trees, or how to traverse a graph. If I had to code a sorting algorithm, I can tell ya it wouldn't have been very good. Every data structure I've ever used was built ...