DEV Community

Discussion on: Solving "Mutations" / freeCodeCamp Algorithm Challenges

Collapse
 
jrogers8835 profile image
jrogers8835

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.