Skip to content

de-gall/tdd-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise: Find the Most Frequent Non-Banned Word

Description

This exercise involves developing a function that takes a string paragraph and an array of banned words, then returns the most frequent word that is not in the list of banned words. It is guaranteed that there is at least one word that is not banned and that the answer is unique.

Objective

The primary objective of this exercise is to enhance skills in string manipulation, array processing, and text analysis. This type of problem is common in natural language processing (NLP) algorithms.

Example

Input

String paragraph = "Bob hit a ball, the hit BALL flew far after it was hit.";
String[] banned = {"hit"};

Output

"ball"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages