Skip to main content
deleted 1 character in body
Source Link
mousetail 'he-him'
  • 13.5k
  • 1
  • 39
  • 85

Python, 10083 bytes

lambda a:[*min({'aa','ab','bb','ba','c'}-{(a.replace('c','')+'c'*('c'in a))[i:i+2]for i in[0,2,4,6]}][0])

Attempt This Online!Attempt This Online!

  • -17 bytes thanks to Neil

Python, 100 bytes

lambda a:[*{'aa','ab','bb','ba','c'}-{(a.replace('c','')+'c'*('c'in a))[i:i+2]for i in[0,2,4,6]}][0]

Attempt This Online!

Python, 83 bytes

lambda a:min({'aa','ab','bb','ba','c'}-{a.replace('c','')[i:i+2]for i in[0,2,4,6]})

Attempt This Online!

  • -17 bytes thanks to Neil
Source Link
mousetail 'he-him'
  • 13.5k
  • 1
  • 39
  • 85

Python, 100 bytes

lambda a:[*{'aa','ab','bb','ba','c'}-{(a.replace('c','')+'c'*('c'in a))[i:i+2]for i in[0,2,4,6]}][0]

Attempt This Online!