Gray Code
来源:互联网 发布:网络小胖图片 编辑:程序博客网 时间:2024/06/04 08:53
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 number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.
For example, given n = 2, return [0,1,3,2]
. Its gray code sequence is:
00 - 001 - 111 - 310 - 2
Note:
For a given n, a gray code sequence is not uniquely defined.
For example, [0,2,3,1]
is also a valid gray code sequence according to the above definition.
For now, the judge is able to judge based on one instance of gray code sequence. Sorry about that.
0 0
- Gray Code
- Gray Code
- gray code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- Gray Code
- 【翻译自mos文章】shutdown normal 挂起 在ora_j00X进程上
- 速度飞快集散地浪费斯蒂芬
- 黑马程序员_高新技术之代理浅谈
- 【翻译自mos文章】怎么样kill 一个被挂起的自动物化视图刷新job?
- 移动互联网时代:要让姑娘在一分钟爱上你
- Gray Code
- 如何成为一名真正的高级程序员/系统分析师
- UI-GET/POST的同步异步网络请求
- [leetcode] integer to roman
- UI-Json解析
- PHP学习笔记1
- 法国队加快更何况,两个地块的土地有
- 12种方法优化苹果,解决机器变慢原因,给系统加速,2007年5月的老贴
- 【翻译自mos文章】 在错误的从os级别remove掉 trace file 之后,怎么找到该trace file的内容?