Gray Code

Solution Code
Verifying access...

Time Complexity

O(2^n)

Space Complexity

O(1) (excluding the space required for the output list)