Solved LeetCode program · 89 of 1,000
#0089 · Gray Code
Original English source
The count is 4. The codes is an empty list of whole numbers.
For every value from 0 to one less than count.
The shifted is shift value right by 1. The code is exclusive or of value and shifted. Place code into codes.
For each code in codes, report code.
Expected stdout
0 1 3 2