Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
deleted 12 characters in body
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

Jelly, 88 6 bytes

ṁƤẹḍƇLḣ@sJEƇḢ€

Try it online!Try it online!

Port of my Brachylog solution.

s         Slice the input into chunks of
 J        every length.
  EƇ      Keep only partitions with all equal elements,
    Ḣ€    and return the first element of each remaining partition.

Jelly, 8 bytes

ṁƤẹḍƇLḣ@

Try it online!

Jelly, 8 6 bytes

sJEƇḢ€

Try it online!

Port of my Brachylog solution.

s         Slice the input into chunks of
 J        every length.
  EƇ      Keep only partitions with all equal elements,
    Ḣ€    and return the first element of each remaining partition.
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

Jelly, 8 bytes

ṁƤẹḍƇLḣ@

Try it online!