Sign up
Log in
Home
Language tracks
Standard ML track
Exercises
Exercises on the Standard ML track
Join the Standard ML Track
27 exercises to help you master Standard ML
easy
Hello World
The classical introductory exercise. Just say "Hello, World!"
misc
easy
Leap
Given a year, report if it is a leap year.
misc
easy
Two Fer
Create a sentence of the form "One for X, one for me."
misc
easy
Space Age
Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
floats
easy
Pangram
Determine if a sentence is a pangram.
misc
easy
Collatz Conjecture
Calculate the number of steps to reach 1 using the Collatz conjecture
math
medium
Matching Brackets
Make sure the brackets and braces all match.
stacks
easy
Allergies
Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
misc
easy
Pig Latin
Implement a program that translates from English to Pig Latin
lists
strings
text formatting
easy
All Your Base
Convert a number, represented as a sequence of digits in one base, to any other base.
math
easy
Bob
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
misc
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.
misc
easy
Anagram
Given a word and a list of possible anagrams, select the correct sublist.
misc
easy
Flatten Array
Take a nested list and return a single list with all values except nil/null
misc
easy
Hamming
Calculate the Hamming difference between two DNA strands.
misc
easy
Raindrops
Convert a number to a string, the content of which depends on the number's factors.
misc
easy
Nth Prime
Given a number n, determine what the nth prime is.
math
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.
math
easy
Atbash Cipher
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
misc
easy
Perfect Numbers
Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
math
easy
Prime Factors
Compute the prime factors of a given natural number.
math
easy
List Ops
Implement basic list operations
misc
easy
RNA Transcription
Given a DNA strand, return its RNA Complement Transcription.
misc
easy
Sum Of Multiples
Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
math
easy
Phone Number
Clean up user-entered phone numbers so that they can be sent SMS messages.
misc
easy
Roman Numerals
Write a function to convert from normal numbers to Roman Numerals.
misc
easy
Diamond
Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.
lists
strings
text formatting