Skip to main content
added 311 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Jelly, 6 bytes

s2Q€Ṗ€

Try it online!

How it works

s2Q€Ṗ€  Main link. Argument: S (string)

s2      Split the string into pairs of characters.
  Q€    Deduplicate each pair.
        This removes the second character iff it is equal to the first.
    Ṗ€  Pop each; remove the last character of each pair/singleton.

Jelly, 6 bytes

s2Q€Ṗ€

Try it online!

Jelly, 6 bytes

s2Q€Ṗ€

Try it online!

How it works

s2Q€Ṗ€  Main link. Argument: S (string)

s2      Split the string into pairs of characters.
  Q€    Deduplicate each pair.
        This removes the second character iff it is equal to the first.
    Ṗ€  Pop each; remove the last character of each pair/singleton.
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Jelly, 6 bytes

s2Q€Ṗ€

Try it online!