Skip to main content
deleted 2 characters in body
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

Alice, 10 bytes

/X.
\ior@/

Try it online!

Explanation

This is just a framework for linear programs that operate entirely in Ordinal (string processing) mode:

/...
\.../

The actual linear code is then:

i.rXo@

Which does:

i   Read all input.
.   Duplicate.
r   Range expansion. If adjacent letters don't have adjacent code points, the
    intermediate code points are filled in between them. E.g. "ae" would turn
    into "abcde". For the inputs in this challenge, this will simply insert
    the missing letter.
X   Symmetric set intersectiondifference. Drops all the letters that appear in both strings,
    i.e. everything except the one that was inserted by the range expansion.
o   Output the result.
@   Terminate the program.

Alice, 10 bytes

/X.
\ior@/

Try it online!

Explanation

This is just a framework for linear programs that operate entirely in Ordinal (string processing) mode:

/...
\.../

The actual linear code is then:

i.rXo@

Which does:

i   Read all input.
.   Duplicate.
r   Range expansion. If adjacent letters don't have adjacent code points, the
    intermediate code points are filled in between them. E.g. "ae" would turn
    into "abcde". For the inputs in this challenge, this will simply insert
    the missing letter.
X   Symmetric set intersection. Drops all the letters that appear in both strings,
    i.e. everything except the one that was inserted by the range expansion.
o   Output the result.
@   Terminate the program.

Alice, 10 bytes

/X.
\ior@/

Try it online!

Explanation

This is just a framework for linear programs that operate entirely in Ordinal (string processing) mode:

/...
\.../

The actual linear code is then:

i.rXo@

Which does:

i   Read all input.
.   Duplicate.
r   Range expansion. If adjacent letters don't have adjacent code points, the
    intermediate code points are filled in between them. E.g. "ae" would turn
    into "abcde". For the inputs in this challenge, this will simply insert
    the missing letter.
X   Symmetric set difference. Drops all the letters that appear in both strings,
    i.e. everything except the one that was inserted by the range expansion.
o   Output the result.
@   Terminate the program.
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

Alice, 10 bytes

/X.
\ior@/

Try it online!

Explanation

This is just a framework for linear programs that operate entirely in Ordinal (string processing) mode:

/...
\.../

The actual linear code is then:

i.rXo@

Which does:

i   Read all input.
.   Duplicate.
r   Range expansion. If adjacent letters don't have adjacent code points, the
    intermediate code points are filled in between them. E.g. "ae" would turn
    into "abcde". For the inputs in this challenge, this will simply insert
    the missing letter.
X   Symmetric set intersection. Drops all the letters that appear in both strings,
    i.e. everything except the one that was inserted by the range expansion.
o   Output the result.
@   Terminate the program.