For such questions, start by discussing the requirements with the interviewer. I decided to break have a collection of abusive or insensitive data in some storage (like trie) and then parsing the strings to see if there are some words which are not suitable. This was my first approach and we kept on refining this approach by discussing various use-cases.
For all rounds, I suggest talking with the interviewer. Be vocal, explain what your approach is and take feedback from interviewer and try to incorporate that into your approach.