Good solution, I like the indexOf rather than iterative comparison. I think you could convert the first word to a set of letters though and do contains for better performance with replicated letters in the first word.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good solution, I like the indexOf rather than iterative comparison. I think you could convert the first word to a set of letters though and do contains for better performance with replicated letters in the first word.