Skip to main content
deleted 474 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

C,  62  58 58  54 bytes

Thanks to @Dennis for saving four four  eight 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]>32||(s[-1]^=s[-2]^=s[*s^=s[-1]^=s[1]^=*s^=s[-2]1]);*s&&f;*++s&&f(s);}

Try it online!Try it online!

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!

C,  62   58  54 bytes

Thanks to @Dennis for saving  four  eight bytes!

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

Try it online!

added 46 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

C, 62 62  58 bytes

Thanks to @Dennis for saving four bytes!

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

Try it online!Try it online!

Recursive version (6258 bytes):

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

Try it online!Try it online!

C, 62 bytes

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

Try it online!

Recursive version (62 bytes):

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

Try it online!

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!

deleted 6 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

C, 6462 bytes

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

Try it online!Try it online!

Recursive version (6462 bytes):

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

Try it online!Try it online!

C, 64 bytes

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

Try it online!

Recursive version (64 bytes):

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

Try it online!

C, 62 bytes

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

Try it online!

Recursive version (62 bytes):

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

Try it online!

deleted 51 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84
Loading
added 560 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84
Loading
Post Undeleted by Steadybox
Post Deleted by Steadybox
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84
Loading