Difficulty : Easy
Topics : Array, Math, Hash Table, String, Counting
Platform : Leetcode
Problem Statement
Given a string paragraph and a string array of the banned words banned, return the most frequent word that is not banned. It is guaranteed there is at least one word that is not banned, and that the answer is unique.
The words in paragraph are case-insensitive and the answer should be returned in lowercase.
Note that words can not contain punctuation symbols.
Problem Statement Simplified
If in the paragraph string have the word in banned array, then discard it. If the paragraph string have ‘.’ or ‘ ’ then remove it. Make everything lowercase.…