摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2015-08-10 23:44
irun
阅读(139)
评论(0)
推荐(0)
摘要:
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 an... 阅读全文
posted @ 2015-08-10 23:15
irun
阅读(133)
评论(0)
推荐(0)
摘要:
118 - Pascal's TriangleGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], ... 阅读全文
posted @ 2015-08-10 21:09
irun
阅读(169)
评论(0)
推荐(0)
摘要:
The 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"tw... 阅读全文
posted @ 2015-08-10 00:30
irun
阅读(144)
评论(0)
推荐(0)
摘要:
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re... 阅读全文
posted @ 2015-08-10 00:12
irun
阅读(154)
评论(0)
推荐(0)

浙公网安备 33010602011771号