In this class I take a look at this classic interview question. You’ll learn how to solve the basic version, but I’ll go deeper and show you improvements for foreign languages and unicode.
I’ve provided source code, in annotated Python, for all of the algorithms I discuss. The latter half of the course walks through the code, explaining the decisions I’ve made.
Source Code: Github.com
Before you look at my examples, try to implement the algorithms I describe. In each case you’ll have a function that takes two strings as arguments and should return true if they are anagrams.
There are a few versions to implement, from easiest to hardest:
Big Bad Snakeand
reve\u0302t(Encode appropriately for your programming language)