Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 735 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 735 Bytes

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"