SitePoint
  • Premium
  • Library
  • Community
  • Jobs
  • Blog
LoginStart Free Trial

The home for developers

Track your course progress, manage projects, and find your dream job - all in one place.

Start Your Free Trial

7 Day Free Trial. Cancel Anytime.

SitePoint Premium

  • Access to 700+ courses
  • Publish articles on SitePoint
  • Daily curated jobs
  • Learning Paths
  • Discounts to dev tools
  • Library/
  • Video courses/
  • Interview Prep: The Anagram Check
Interview Prep: The Anagram Check

Interview Prep: The Anagram Check

Check if two strings are anagrams of each other


Course details

0∙ Ratings0 reviews

Published
April 2020
Videos
8
Duration
23m
Happy students
113

Take this course

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`

Course Instructor

Edaqa Mortoray

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.

Course Outline

Lesson 1: Anagram Check
  • Free
    Introduction
    0:39
  • Locked
    Algorithm Design
    3:22
  • Locked
    Unicode Version
    5:47
  • Locked
    Algorithm Code
    3:44
  • Locked
    Unicode Code
    5:59
  • Locked
    Language Base Code
    1:57
  • Locked
    Emoji Code
    2:00
  • Locked
    Conclusion
    0:31

Reviews

0 total

0
0
0
0
0

Course details

0∙ Ratings0 reviews

Published
April 2020
Videos
8
Duration
23m
Happy students
113

Take this course
SitePoint

Stuff we do

  • Premium
  • Newsletters
  • Learning paths
  • Library
  • Forums

Contact

  • Contact us
  • FAQ
  • Publish your book
  • Write an article
  • Advertise

About

  • Our Story
  • Corporate Memberships
  • Start free trial
  • Login

Connect

  • RSS
  • Facebook
  • Twitter (X)
  • Instagram

Subscribe to our newsletter

Get the freshest news and resources for developers, designers and digital creators in your inbox each week

© 2000 – 2025 SitePoint Pty. Ltd.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Terms of usePrivacy policy