http://oj.leetcode.com/problems/gray-code/