Available question text
Generate any cyclic n-bit Gray-code ordering of all numbers 0..2^n-1 that starts with start, i.e., a permutation where each adjacent pair (including last→first) differs by exactly one bit. Constraints: 1 ≤ n ≤ 16 so the sequence length is 2^n.
Related questions
Continue with questions that share topics or the same question type.
- Number of Steps to Reduce a Number in Binary Representation to One
Coding
- Prime Number of Set Bits in Binary Representation
Coding
- Add Binary
Coding · Bit Manipulation · Math · Simulation
- All Divisions With the Highest Score of a Binary Array
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1238. Circular Permutation in Binary Representation
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source