This is the seventh article of my attempts to follow Stephen Grider's Udemy course in three different languages. JavaScript solutions are by Stephe...
For further actions, you may consider blocking this person and/or reporting abuse
Great article Tommy!
I love finding smaller solutions to problems, here is a similar attempt to your question on anagrams.
This is a great solution Sam, the only thing I worry about is that multiplication though theoretically is an O(1) operation, but in for strings of size > 50, we will have resort to Big integers and multiplication there is not exactly O(1).
Also played a bit of code golf with your algorithm
Nice thing about this method, you can use modulus to check if a string is a substring of another (“apple” to “applesauce”).
That might give false positive for jumbled words, for example paple would pass the modulous check.