Interview Prep: The Anagram Check

Check if two strings are anagrams of each other

Start Free Trial
  • 8 Videos
  • 0 hours 23 minutes
  • 113 Happy Students

About the course

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 and pointers
  • Ignore the case of the letters and drop all whitespace. Test Case: Big Bad Snake and Beanbag Kids
  • Non-English support with accents. Test Case: trêve and reve\u0302t (Encode appropriately for your programming language)
  • Dropping accents. Test Case: trêve and verte

  • 8 Videos
  • 0 hours 23 minutes
  • 113 Happy Students
Start Free Trial

Your instructor

Edaqa Mortoray


Hi, I'm Edaqa, a programmer, writer and chef. For over 20 years, I've been following a diverse and exciting career path. My journey traces through several countries, filled with great people and culture. I've dedicated my time to numerous startups, and an abundance of side projects. There's so much I'd like to share with all with you -- from programming to cooking, to the unusual creative endeavours. I want my classes to give you the confidence you need to succeed, and the curiosity required to make the most of life. Join me in my continuing adventures.
Edaqa Mortoray
6 Courses

Customer Reviews

  • ()
    5 stars
    4 stars
    3 stars
    2 stars
    1 stars

    Courses Outline

    Lesson 1: Anagram Check
    Free
    Introduction
    0:39
    Algorithm Design
    3:22
    Unicode Version
    5:47
    Algorithm Code
    3:44
    Unicode Code
    5:59
    Language Base Code
    1:57
    Emoji Code
    2:00
    Conclusion
    0:31
    Start Free Trial
    • 8 Videos
    • 0 hours 23 minutes
    • 113 Happy Students