Skip to main content
-3 bytes
Source Link
matteo_c
  • 7k
  • 15
  • 28

C (GCC), 6363 60 bytes

-3 bytes thanks to @Juan Ignacio Díaz

f(v,n,b,j)int*v;{for(b=j=0;j<n-1;b=j=0;n+~j;)b|=v[j/2]<v[++j];return 1-!b;}

Attempt This Online!Attempt This Online!

I know 2 bytes can be saved by inverting the meaningOriginal note of the values 0 and 1, but I prefer to keep it this way.63 bytes version:

I know 2 bytes can be saved by inverting the meaning of the values 0 and 1, but I prefer to keep it this way.

C (GCC), 63 bytes

f(v,n,b,j)int*v;{for(b=j=0;j<n-1;)b|=v[j/2]<v[++j];return 1-b;}

Attempt This Online!

I know 2 bytes can be saved by inverting the meaning of the values 0 and 1, but I prefer to keep it this way.

C (GCC), 63 60 bytes

-3 bytes thanks to @Juan Ignacio Díaz

f(v,n,b,j)int*v;{for(b=j=0;n+~j;)b|=v[j/2]<v[++j];return!b;}

Attempt This Online!

Original note of the 63 bytes version:

I know 2 bytes can be saved by inverting the meaning of the values 0 and 1, but I prefer to keep it this way.

added note on how 2 bytes can be saved
Source Link
matteo_c
  • 7k
  • 15
  • 28

C (GCC), 63 bytes

f(v,n,b,j)int*v;{for(b=j=0;j<n-1;)b|=v[j/2]<v[++j];return 1-b;}

Attempt This Online!

I know 2 bytes can be saved by inverting the meaning of the values 0 and 1, but I prefer to keep it this way.

C (GCC), 63 bytes

f(v,n,b,j)int*v;{for(b=j=0;j<n-1;)b|=v[j/2]<v[++j];return 1-b;}

Attempt This Online!

C (GCC), 63 bytes

f(v,n,b,j)int*v;{for(b=j=0;j<n-1;)b|=v[j/2]<v[++j];return 1-b;}

Attempt This Online!

I know 2 bytes can be saved by inverting the meaning of the values 0 and 1, but I prefer to keep it this way.

Source Link
matteo_c
  • 7k
  • 15
  • 28

C (GCC), 63 bytes

f(v,n,b,j)int*v;{for(b=j=0;j<n-1;)b|=v[j/2]<v[++j];return 1-b;}

Attempt This Online!