Given a string named “paragraph” and a list of strings named “forbidden words”, the most frequent word within the paragraph that is not in the forbidden words list should be returned. Only one word should return and this word can’t be a forbidden word. The words within the paragraph are not case sensitive and the answer must be in lower case.
Input: paragraph = “Bob hit a ball, the hit BALL flew long after it was hit.“, forbiddenWords = [“hit”] Output: “ball”