← back to unit
Medium
# puzzle gauntlet medium
The Echo Word
Some words are secretly one small chunk on repeat: 'abab' echoes 'ab', 'zzz' echoes 'z'. 📢
You get a word. Print echo if it's some chunk repeated two or more times, otherwise original.
Example:
Input: word = "abab"
Output: echo
The chunk "ab" repeated twice rebuilds the whole word.
💡 need a hint?
pg-echo-word.py🔒 given lines are locked — write your code in between
loading...