Interview Prep: The Anagram Check
Edaqa Mortoray
23:59
More details
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:
- Basic english without accents and comparing all characters. Test Case:
proteins
andpointers
- Ignore the case of the letters and drop all whitespace. Test Case:
Big Bad Snake
andBeanbag Kids
- Non-English support with accents. Test Case:
trêve
andreve\u0302t
(Encode appropriately for your programming language) - Dropping accents. Test Case:
trêve
andverte
User Reviews
Rating
Edaqa Mortoray
Instructor's Courses
SitePoint
View courses SitePoint- language english
- Training sessions 8
- duration 23:59
- Release Date 2023/09/25