Skip to main content

Checkpoint: word stats pipeline

Challenge on lesson: Checkpoint: The Word-Stats Pipeline

Implement analyze(words) returning a WordStats record with three parts, each built with streams: byInitial maps each lowercase first letter to how many words start with it (case-insensitive); longest lists every word whose length equals the maximum length found (original casing, in original order); joined is Optional of all words joined by " & ", empty when the input is empty.

Difficulty: advanced

Back to lesson: Checkpoint: The Word-Stats Pipeline