Univariate words

A word is said to be univariate when all its letters are the same. For instance ’xxx’ is an univariate word. Write a function @has_univariate_word(f)@ that given a list ff of nonempty strings of lowercase letters, returns True when ff contains an univariate word. The function returns False if ff has no univariate words.

Important condition. Solutions employing position-wise indexed access to the argument of the function (as in @f[i]@) are not accepted.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T16:32:08.178Z

© Jutge.org, 2006–2026.
https://jutge.org