89. Gray Code
Link key ideas Create an array res with size 2^n Set res[0] = 0 as the base case Iterate over the array, trying to insert a valid number in every iteration. To find a valid number, we create another loop, and in this nested loop: toggle the righ...
Dec 24, 20222 min read10