Describe the issue linked to the documentation
Are you sure the time complexity is right? Exponential complexity with respect to the number of layers rather than polynomial?

Suggest a potential alternative/fix
I notice a different answer from here, and I think it right.