Skip to main content
edited body
Source Link

C GCC, 4140 bytes

f(int*a){*a=*a^*++aa=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte2 bytes!

C GCC, 41 bytes

f(int*a){*a=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte!

C GCC, 40 bytes

f(int*a){a=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -2 bytes!

deleted 4 characters in body
Source Link

C GCC, 4241 bytes

r;ff(int*a){r=*a^*++a*a=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte!

C GCC, 42 bytes

r;f(int*a){r=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte!

C GCC, 41 bytes

f(int*a){*a=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte!

deleted 1 character in body
Source Link

C GCC, 4342 bytes

r;f(int*a){r=*a^a[1]r=*a^*++a?a[a[1]!=a[2]]a[-(*a==a[1])]:f(a+1a);}

Try it online!Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte!

C GCC, 43 bytes

r;f(int*a){r=*a^a[1]?a[a[1]!=a[2]]:f(a+1);}

Try it online!

Thanks to xibu for -5 bytes!

C GCC, 42 bytes

r;f(int*a){r=*a^*++a?a[-(*a==a[1])]:f(a);}

Try it online!

Thanks to xibu for -5 bytes!

Thanks to ceilingcat for -1 byte!

added 3 characters in body
Source Link
Loading
deleted 49 characters in body
Source Link
Loading
added 41 characters in body
Source Link
Loading
deleted 10 characters in body
Source Link
Loading
deleted 2 characters in body
Source Link
Loading
Source Link
Loading