Given a non-negative integer n
, print the result of P(P(...P({})))
, where the number of P
's is n
(P
is the power set function).
0 => {}
1 => P({})
2 => P(P({}))
3 => P(P(P({})))
n => P(f(n-1))
input result
0 {}
1 {{}}
2 {{},{{}}}
3 {{},{{}},{{{}}},{{},{{}}}}
...
The result should only contain parentheses/brackets/braces and commas, spaces and newlines are allowed.
{}
, because it means answers have to use a significant amount of bytes in converting their output to the required form. For future reference, we strongly recommend you first post your challenge ideas in the Sandbox to get feedback like this before you post them to the main site. \$\endgroup\${{{}},{}}
and{{},{{}}}
are ok? And can the output contain duplicates, e.g.{{{}},{},{}}
? \$\endgroup\$