0 and 1 in this order: first by length (shortest first), and strings of the same length in increasing order as binary numbers. The empty string comes first:
"", "0", "1", "00", "01", "10", "11", "000", ...
Positions start at zero. Given num, return the string at position num.num=5 → '10'
The list starts "" (0), "0" (1), "1" (2), "00" (3), "01" (4), "10" (5).
num=0 → ''
The very first code is the empty one.
num=13 → '110'
There are 7 codes of length at most 2 (numbers 0–6), then eight codes of length 3: "000" is number 7, and "110" is number 13.
num < 2⁶²num=5
'10'
Run checks the first 3 tests in your browser. Submit checks all 113 tests on the server, hidden ones included.