摘要:
Same TreeSep 3 '12Given 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.bad one recursive./** * Definition for binary tree * public class TreeNode { * int val; * ... 阅读全文
posted @ 2013-01-30 17:05
西施豆腐渣
阅读(104)
评论(0)
推荐(0)
摘要:
Count and SayMar 6 '12The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"two 1s"or21.21is read off as"one 2, thenone 1"or1211.Given an integern, generate thenthsequence. 阅读全文
posted @ 2013-01-30 15:51
西施豆腐渣
阅读(137)
评论(0)
推荐(0)
浙公网安备 33010602011771号