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

Return to Revisions

1 of 2
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

Jelly, 8 bytes

ḲOr97ỌKY

Try it online!

ḲOr97ỌKY - a monadic link taking a string, e.g. "ab c"
Ḳ - split at spaces --> ["ab", "c"]
 O - get ASCII codes --> [[97, 98], [99]]
 r97 - build descending range to 97 --> [[[97], [98, 97]], [[99, 98, 97]]]
 Ọ - turn back into ASCII --> [["a", "ba"], ["cba"]]
 K - join with spaces --> ["a", "ba", " ", "cba"]
 Y - join with linefeeds
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

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