Skip to main content
2 of 4
links mess with the leaderboard ;)
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

Pyth, 23 bytes

GitHub repository for Pyth

Ju+G*]GHQYjbmj\ msqdkJJ

Input is a list of integers, like [3, 2, 1]. Try it online: Pyth Compiler/Executor

Uses a quite similar idea as randomra's J code.

Jakube
  • 21.9k
  • 3
  • 27
  • 108