Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1238. Circular Permutation in Binary Representation
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.