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

5 of 6
added 46 characters in body
Steadybox
  • 16.6k
  • 5
  • 42
  • 84

C, (削除) 62 (削除ここまで) 58 bytes

Thanks to @Dennis for saving four bytes!

f(char*s){*++s>32||(s[-1]^=s[-2]^=s[-1]^=s[-2]);*s&&f(s);}

Try it online!

Recursive version (58 bytes):

f(char*s){*++s-32&&*s||(s[-1]^=s[-2]^=s[-1]^=s[-2]);*s&&f(s);}

Try it online!

Steadybox
  • 16.6k
  • 5
  • 42
  • 84

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