Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
14
  • 2
    \$\begingroup\$ May we output a list of strings instead of a single string with linefeeds? \$\endgroup\$ Commented Nov 21, 2019 at 13:10
  • 16
    \$\begingroup\$ I don't think a single answer uses recursion \$\endgroup\$ Commented Nov 22, 2019 at 1:39
  • 3
    \$\begingroup\$ "Human readable" prohibits most of the languages popular here! \$\endgroup\$ Commented Nov 22, 2019 at 2:50
  • 2
    \$\begingroup\$ @WGroleau Ah, I think I've spotted what's gone wrong here. I didn't require that the code should be human-readable, only the result. \$\endgroup\$ Commented Nov 22, 2019 at 9:13
  • 3
    \$\begingroup\$ Recursion is never necessary. At the very worst, you can just use stack data structure to have your own "recursion" in a flat loop, ending when the stack is empty. \$\endgroup\$ Commented Nov 22, 2019 at 11:41

AltStyle によって変換されたページ (->オリジナル) /