JavaScript (ES6), (削除) 50 (削除ここまで) 49 bytes
Saved 1 byte thanks to @Shaggy
f=n=>n?[...f(n-1),(g=_=>n?[n,...g(--n)]:[])()]:[]
Arnauld
- 205.5k
- 21
- 187
- 670
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeSaved 1 byte thanks to @Shaggy
f=n=>n?[...f(n-1),(g=_=>n?[n,...g(--n)]:[])()]:[]