摘要:
在一组数的编码中,若任意两个相邻的代码只有一位二进制数不同, 则称这种编码为格雷码(Gray Code),请编写一个函数,使用递归的方法生成N位的格雷码。 给定一个整数n,请返回n位的格雷码,顺序为从0开始。 Example: 1 : 0 , 1 2: 00 01 11 10 3: 000 001 阅读全文
posted @ 2016-03-27 09:53
YuriFLAG
阅读(274)
评论(0)
推荐(0)
摘要:
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space 阅读全文
posted @ 2016-03-27 09:00
YuriFLAG
阅读(177)
评论(0)
推荐(0)
摘要:
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2016-03-27 08:48
YuriFLAG
阅读(132)
评论(0)
推荐(0)

浙公网安备 33010602011771号