Skip to main content
bug fix
Source Link
Aiden Chow
  • 14.2k
  • 1
  • 17
  • 55

Desmos, 9396 bytes

C=C=sgn(L[2...]-L)^2
g(L)=∑_{n=1}^{[1...C.count]}C[n]
f(A,B)=sort(join(A,B),join(0,g(A),0,g(B)))

Ok this can probably be improved somehow but for now this is good enough.

Try It On Desmos!Try It On Desmos!

Try It On Desmos! - PrettifiedTry It On Desmos! - Prettified

Desmos, 93 bytes

C=(L[2...]-L)^2
g(L)=∑_{n=1}^{[1...C.count]}C[n]
f(A,B)=sort(join(A,B),join(0,g(A),0,g(B)))

Ok this can probably be improved somehow but for now this is good enough.

Try It On Desmos!

Try It On Desmos! - Prettified

Desmos, 96 bytes

C=sgn(L[2...]-L)^2
g(L)=∑_{n=1}^{[1...C.count]}C[n]
f(A,B)=sort(join(A,B),join(0,g(A),0,g(B)))

Ok this can probably be improved somehow but for now this is good enough.

Try It On Desmos!

Try It On Desmos! - Prettified

Source Link
Aiden Chow
  • 14.2k
  • 1
  • 17
  • 55

Desmos, 93 bytes

C=(L[2...]-L)^2
g(L)=∑_{n=1}^{[1...C.count]}C[n]
f(A,B)=sort(join(A,B),join(0,g(A),0,g(B)))

Ok this can probably be improved somehow but for now this is good enough.

Try It On Desmos!

Try It On Desmos! - Prettified