Skip to main content
added 162 characters in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38

C (gcc), 70 bytes

o(s,a)char*s;{for(a=0;s[1];s++)a|=s[1]-*s&64|*s-s[1]&32;return a!=96;} 

I was hoping to find a shorter solution based on a recursive function, but it didn't work out due to the output requirement. So here's an imperative approach. At least, C's operator precedence works nicely for the inner loop statement.

Try it online!

C (gcc), 70 bytes

o(s,a)char*s;{for(a=0;s[1];s++)a|=s[1]-*s&64|*s-s[1]&32;return a!=96;} 

Try it online!

C (gcc), 70 bytes

o(s,a)char*s;{for(a=0;s[1];s++)a|=s[1]-*s&64|*s-s[1]&32;return a!=96;} 

I was hoping to find a shorter solution based on a recursive function, but it didn't work out due to the output requirement. So here's an imperative approach. At least, C's operator precedence works nicely for the inner loop statement.

Try it online!

added 6 characters in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38

C (gcc), 5970 bytes

o(char*ss,a)char*s;{s++;return!*s|!s[1]||for(s[-1]a=0;s[1];s++)a|=s[1]-*s^*s*s&64|*s-s[1])>=0&o(s);s[1]&32;return a!=96;} 

Assumes signed char.

Try it online!Try it online!

C (gcc), 59 bytes

o(char*s){s++;return!*s|!s[1]||(s[-1]-*s^*s-s[1])>=0&o(s);} 

Assumes signed char.

Try it online!

C (gcc), 70 bytes

o(s,a)char*s;{for(a=0;s[1];s++)a|=s[1]-*s&64|*s-s[1]&32;return a!=96;} 

Try it online!

Post Undeleted by nwellnhof
Post Deleted by nwellnhof
added 1 character in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38

C (gcc), 6059 bytes

o(char*s){returns++;return!s[1]|*s|!s[2]||s[1]||(*ss[-s[1]^s[1]1]-s[2]*s^*s-s[1])>=0&o(s+1s);} 

Assumes signed char.

Try it online!Try it online!

C (gcc), 60 bytes

o(char*s){return!s[1]|!s[2]||(*s-s[1]^s[1]-s[2])>=0&o(s+1);} 

Assumes signed char.

Try it online!

C (gcc), 59 bytes

o(char*s){s++;return!*s|!s[1]||(s[-1]-*s^*s-s[1])>=0&o(s);} 

Assumes signed char.

Try it online!

deleted 3 characters in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38
Loading
added 77 characters in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38
Loading
Post Undeleted by nwellnhof
Post Deleted by nwellnhof
Source Link
nwellnhof
  • 10.6k
  • 1
  • 20
  • 38
Loading