Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

n = 0 mean the length is 0, so the program should return [].

Go fix the test case please.

I am thinking about the same thing

Actually, for n = 0, 2^n = 1, so [0] is the correct answer.

n means the lenght, so for n=0, it should return []

the length of |0| is 0, so [0] are all the codes of length 0. [0] is correct, not []

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.