ðŸŽ‰ Exercism Research is now launched. Help Exercism, help science and have some fun at
research.exercism.io
ðŸŽ‰
Sign up
Log in
Home
Language tracks
Objective-C track
Exercises
Exercises on the Objective-C track
Join the Objective-C Track
51 exercises to help you master Objective-C
easy
Hello World
The classical introductory exercise. Just say "Hello, World!"
optional values
text formatting
easy
Two Fer
Create a sentence of the form "One for X, one for me."
optional values
text formatting
easy
Bob
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
control flow if else statements
strings
easy
Leap
Given a year, report if it is a leap year.
integers
easy
Gigasecond
Given a moment, determine the moment that would be after a gigasecond has passed.
dates
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.
integers
math
easy
Reverse String
Reverse a string
strings
easy
Sum Of Multiples
Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
lists
transforming
math
easy
Space Age
Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
discriminated unions
floating point numbers
easy
Hamming
Calculate the Hamming difference between two DNA strands.
filtering
strings
easy
Nucleotide Count
Given a DNA string, compute how many times each nucleotide occurs in the string.
maps
strings
easy
Raindrops
Convert a number to a string, the content of which depends on the number's factors.
filtering
text formatting
easy
Grade School
Given students' names along with the grade that they are in, create a roster for the school
maps
sorting
easy
ETL
We are going to do the `Transform` step of an Extract-Transform-Load.
maps
transforming
easy
Isogram
Determine if a word or phrase is an isogram.
filtering
strings
easy
Flatten Array
Take a nested list and return a single list with all values except nil/null
lists
looping
searching
easy
Prime Factors
Compute the prime factors of a given natural number.
integers
looping
math
easy
Sublist
Write a function to determine if a list is a sublist of another list.
lists
looping
easy
Clock
Implement a clock that handles times without dates.
structural equality
time
easy
Triangle
Determine if a triangle is equilateral, isosceles, or scalene.
discriminated unions
integers
easy
Robot Name
Manage robot factory settings.
randomness
strings
easy
Scrabble Score
Given a word, compute the Scrabble score for that word.
transforming
easy
Phone Number
Clean up user-entered phone numbers so that they can be sent SMS messages.
parsing
transforming
easy
Perfect Numbers
Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
discriminated unions
integers
math
easy
Secret Handshake
Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
bitwise operations
lists
easy
Atbash Cipher
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
maps
strings
transforming
easy
Sieve
Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
filtering
math
easy
Collatz Conjecture
Calculate the number of steps to reach 1 using the Collatz conjecture
integers
math
easy
Series
Given a string of digits, output all the contiguous substrings of length `n` in that string.
integers
lists
looping
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.
filtering
sequences
medium
Beer Song
Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
conditionals
looping
strings
medium
Word Count
Given a phrase, count the occurrences of each word in that phrase.
maps
strings
transforming
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.
bitwise operations
enumerations
filtering
medium
Meetup
Calculate the date of meetups.
dates
medium
Anagram
Given a word and a list of possible anagrams, select the correct sublist.
filtering
strings
medium
Acronym
Convert a long phrase to its acronym
strings
transforming
medium
All Your Base
Convert a number, represented as a sequence of digits in one base, to any other base.
integers
transforming
math
medium
Largest Series Product
Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
integers
strings
transforming
math
medium
Pangram
Determine if a sentence is a pangram.
searching
strings
transforming
medium
Transpose
Take input text and output it transposed.
strings
transforming
medium
Binary Search
Implement a binary search algorithm.
integers
recursion
searching
medium
Crypto Square
Implement the classic method for composing secret messages called a square code.
looping
strings
transforming
medium
Pascal's Triangle
Compute Pascal's triangle up to a given number of rows.
lists
recursion
math
medium
Say
Given a number from 0 to 999,999,999,999, spell out that number in English.
loops
parsing
text formatting
transforming
medium
Bracket Push
conditionals
looping
strings
medium
Roman Numerals
Write a function to convert from normal numbers to Roman Numerals.
recursion
transforming
medium
Run Length Encoding
Implement run-length encoding and decoding.
algorithms
transforming
medium
Luhn
Given a number determine whether or not it is valid per the Luhn formula.
algorithms
strings
transforming
easy
RNA Transcription
Given a DNA strand, return its RNA Complement Transcription.
conditionals
loops
strings
transforming
easy
Grains
Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
integers
medium
Nth Prime
Given a number n, determine what the nth prime is.
integers
loops
math