Sign up
Log in
Home
Language Tracks
Erlang Track
Exercises
Join the Erlang Track
Exercises on the Erlang Track
52 exercises to help you master Erlang
medium
easy
Hello World
The classical introductory exercise. Just say "Hello, World!"
strings
medium
easy
Leap
Given a year, report if it is a leap year.
control flow conditionals
logic
medium
easy
Accumulate
Implement the `accumulate` operation, which, given a collection and an operation to perform on each element of the collection, returns a new collection containing the result of applying that operation to each element of the input collection.
lists
mathematics
medium
easy
Collatz Conjecture
Calculate the number of steps to reach 1 using the Collatz conjecture
control flow conditionals
pattern matching
medium
easy
Raindrops
Convert a number to a string, the contents of which depend on the number's factors.
control flow conditionals
pattern matching
strings
medium
easy
Rna Transcription
Given a DNA strand, return its RNA Complement Transcription.
control flow conditionals
pattern matching
strings
medium
easy
Bob
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
pattern matching
strings
medium
easy
Strain
Implement the `keep` and `discard` operation on collections. Given a collection and a predicate on the collection's elements, `keep` returns a new collection containing those elements where the predicate is true, while `discard` returns a new collection containing those elements where the predicate is false.
lists
control flow conditionals
medium
easy
Hamming
Calculate the Hamming difference between two DNA strands.
strings
medium
easy
Space Age
Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
mathematics
time
medium
easy
Secret Handshake
Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
control flow conditionals
pattern matching
strings
medium
easy
Grains
Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
bitwise operations
mathematics
pattern matching
medium
easy
Isogram
Determine if a word or phrase is an isogram.
control flow conditionals
pattern matching
strings
medium
easy
Pangram
Determine if a sentence is a pangram.
control flow conditionals
control flow recursion
strings
medium
easy
Nucleotide Count
Given a DNA string, compute how many times each nucleotide occurs in the string.
parsing
strings
medium
easy
Difference Of Squares
Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
control flow recursion
mathematics
pattern matching
medium
easy
Triangle
Determine if a triangle is equilateral, isosceles, or scalene.
control flow conditionals
mathematics
medium
easy
Sum Of Multiples
Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
mathematics
medium
easy
Perfect Numbers
Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
integers
mathematics
medium
easy
Armstrong Numbers
Determine if a number is an Armstrong number
integers
mathematics
medium
easy
Anagram
Given a word and a list of possible anagrams, select the correct sublist.
lists
filtering
strings
medium
easy
Atbash Cipher
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
algorithms
strings
medium
easy
Phone Number
Clean up user-entered phone numbers so that they can be sent SMS messages.
parsing
strings
medium
easy
Isbn Verifier
Check if a given string is a valid ISBN-10 number.
algorithms
mathematics
medium
easy
Bracket Push
Make sure the brackets and braces all match.
misc
medium
easy
Gigasecond
Calculate the moment when someone has lived for 10^9 seconds.
dates
mathematics
medium
easy
Scrabble Score
Given a word, compute the scrabble score for that word.
pattern matching
strings
medium
easy
Two Fer
Create a sentence of the form "One for X, one for me."
strings
medium
medium
Robot Simulator
Write a robot simulator.
algorithms
control flow conditionals
control flow recursion
medium
medium
Grade School
Given students' names along with the grade that they are in, create a roster for the school
pattern matching
medium
medium
Word Count
Given a phrase, count the occurrences of each word in that phrase.
lists
maps
strings
medium
medium
Clock
Implement a clock that handles times without dates.
control flow conditionals
time
medium
medium
Allergies
Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
algorithms
bitwise operations
medium
medium
All Your Base
Convert a number, represented as a sequence of digits in one base, to any other base.
mathematics
medium
medium
Series
Given a string of digits, output all the contiguous substrings of length `n` in that string.
strings
medium
medium
Parallel Letter Frequency
Count the frequency of letters in texts using parallel computation.
pattern matching
strings
medium
medium
Roman Numerals
Write a function to convert from normal numbers to Roman Numerals.
pattern matching
strings
medium
medium
Sieve
Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
filtering
mathematics
medium
medium
Largest Series Product
Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
mathematics
strings
medium
medium
Complex Numbers
Implement complex numbers.
mathematics
parsing
strings
medium
medium
Rotational Cipher
Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
algorithms
strings
medium
medium
Etl
We are going to do the `Transform` step of an Extract-Transform-Load.
algorithms
maps
strings
medium
medium
Bank Account
Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!
algorithms
functions
pattern matching
medium
medium
Luhn
Given a number determine whether or not it is valid per the Luhn formula.
algorithms
mathematics
medium
medium
Custom Set
Create a custom set type.
types
medium
medium
Meetup
Calculate the date of meetups.
control flow conditionals
dates
medium
medium
Pascals Triangle
Compute Pascal's triangle up to a given number of rows.
mathematics
pattern matching
strings
medium
medium
Circular Buffer
A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.
algorithms
types
medium
medium
Minesweeper
Add the numbers to a minesweeper board
lists
parsing
strings
transforming
medium
medium
Beer Song
Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
strings
text formatting
medium
hard
Zipper
Creating a zipper for a binary tree.
algorithms
control flow recursion
types
medium
hard
Spiral Matrix
Given the size, return a square matrix of numbers in spiral order.
algorithms
mathematics