Narrative Words

Problem Overview

  • Count the number of words that contain at least one letter repeated three times consecutively, case-insensitive.
  • Input: a sentence; words are sequences of English letters separated by whitespace; Output: the count.
  • Performance requirement: time complexity no worse than O(sentence.length * longestWord.length); other constraints unknown.
  • Text processing domain; Trade_desk coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: