| Find a code where subsequent numbers differ in one bit | |||||
|---|---|---|---|---|---|
Complexity (1-100): 27
Grey code is a code Grey(x) such that each succeeding code Grey(x-1) differs from its predecessors in one bit. Example:
There are more than one codes which hold this property. The task is to find such function Grey(x), which will map any integer number in the range 0..231-1 to its Grey code. |
|||||
| Solution: | Show/hide explanation | Solution.hs | ||||
Book of programming problems is powered by UseBB 1 Forum Software | Contact Admin