Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5, Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,... Read More
posted @ 2014-07-24 11:13
Xylophone
Views(131)
Comments(0)
Diggs(0)
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total numb... Read More
posted @ 2014-07-24 10:00
Xylophone
Views(131)
Comments(0)
Diggs(0)
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 / \ ... Read More
posted @ 2014-07-24 08:58
Xylophone
Views(129)
Comments(0)
Diggs(0)
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... Read More
posted @ 2014-07-24 08:27
Xylophone
Views(140)
Comments(0)
Diggs(0)
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.解题方法-----1.回溯法要解决N皇后问题,其实就是... Read More
posted @ 2014-07-24 06:39
Xylophone
Views(231)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号