Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion exercises/accumulate/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
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.
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.

Given the collection of numbers:

Expand Down
2 changes: 1 addition & 1 deletion exercises/acronym/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Convert a long phrase to its acronym.
Convert a phrase to its acronym.

Techies love their TLA (Three Letter Acronyms)!

Expand Down
3 changes: 2 additions & 1 deletion exercises/bank-account/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!
Simulate a bank account supporting opening/closing, withdrawals, and deposits
of money. Watch out for concurrent transactions!

A bank account can be accessed in multiple ways. Clients can make
deposits and withdrawals using the internet, mobile phones, etc. Shops
Expand Down
7 changes: 2 additions & 5 deletions exercises/book-store/description.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually like the removed text better here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ErikSchierboom I have been following the discussion here and I agree with you on this point but I would like to add that the hyphen should be removed if multiple is left in. I like multiple book better than multi-book. I never really noticed it before till the topic of consolidation came up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced and de-hyphened as suggested.

To try and encourage more sales of the 5 different books
they sell of a popular series, a bookshop has decided to
offer discounts of multi-book purchases.
To try and encourage more sales of different books from a popular 5 book
series, a bookshop has decided to offer discounts on multiple book purchases.

One copy of any of the five books costs $8.

Expand Down
6 changes: 2 additions & 4 deletions exercises/bracket-push/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Make sure the brackets and braces all match.

Ensure that all the brackets and braces are matched correctly,
and nested correctly.
Given a string containing brackets `[]`, braces `{}` and parentheses `()`,
verify that all the pairs are matched and nested correctly.
7 changes: 2 additions & 5 deletions exercises/change/description.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
Correctly determine change to be given using the least number of coins.

Correctly determine the fewest number of coins to be given to the user
such that the sum of the coins' value would equal the correct amount
of change.
Correctly determine the fewest number of coins to be given to a customer such
that the sum of the coins' value would equal the correct amount of change.

## For example

Expand Down
2 changes: 0 additions & 2 deletions exercises/circular-buffer/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.

A circular buffer, cyclic buffer or ring buffer is a data structure that
uses a single, fixed-size buffer as if it were connected end-to-end.

Expand Down
2 changes: 0 additions & 2 deletions exercises/clock/description.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Implement a clock that handles times without dates.

Create a clock that is independent of date.

You should be able to add and subtract minutes to it.

Two clocks that represent the same time should be equal to each other.
3 changes: 1 addition & 2 deletions exercises/counter/description.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Design a test suite for a line/letter/character counter tool.

**NOTE: This exercise has been deprecated.**

Please see the discussion in https://github.com/exercism/x-common/issues/80
for more context.

--------
Design a test suite for a line/letter/character counter tool.

This is a special exercise. Instead of creating code that works with
an existing test suite you get to define the test suite. To help you
Expand Down
4 changes: 0 additions & 4 deletions exercises/diamond/description.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.

## Diamond kata

The diamond kata takes as its input a letter, and outputs it in a diamond
shape. Given a letter, it prints a diamond starting with 'A', with the
supplied letter at the widest point.
Expand Down
2 changes: 1 addition & 1 deletion exercises/flatten-array/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Take a nested list and return a single list with all values except nil/null.
Take a nested list and return a single flattened list with all values except nil/null.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs formatting for width?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but not initial duplication related.


The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.

Expand Down
3 changes: 2 additions & 1 deletion exercises/grade-school/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given students' names along with the grade that they are in, create a roster for the school.
Given students' names along with the grade that they are in, create a roster
for the school.

In the end, you should be able to:

Expand Down
3 changes: 2 additions & 1 deletion exercises/grains/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
Calculate the number of grains of wheat on a chessboard given that the number
on each square doubles.

There once was a wise servant who saved the life of a prince. The king
promised to pay whatever the servant could dream up. Knowing that the
Expand Down
5 changes: 3 additions & 2 deletions exercises/grep/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line.
Search a file for lines matching a regular expression pattern. Return the line
number and contents of each matching line.

The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
that match a user-provided search query (known as the *pattern*).
Expand Down Expand Up @@ -59,4 +60,4 @@ hello again
The `grep` command should support multiple flags at once.

For example, running `grep -l -v "hello" file1.txt file2.txt` should
print the names of files that do not contain the string "hello".
print the names of files that do not contain the string "hello".
3 changes: 2 additions & 1 deletion exercises/kindergarten-garden/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given a diagram, determine which plants each child in the kindergarten class is responsible for.
Given a diagram, determine which plants each child in the kindergarten class is
responsible for.

The kindergarten class is learning about growing plants. The teachers
thought it would be a good idea to give them actual seeds, plant them in
Expand Down
3 changes: 2 additions & 1 deletion exercises/largest-series-product/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
Given a string of digits, calculate the largest product for a contiguous
substring of digits of length n.

For example, for the input `'1027839564'`, the largest product for a
series of 3 digits is 270 (9 * 5 * 6), and the largest product for a
Expand Down
3 changes: 2 additions & 1 deletion exercises/matrix/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given a string representing a matrix of numbers, return the rows and columns of that matrix.
Given a string representing a matrix of numbers, return the rows and columns of
that matrix.

So given a string with embedded newlines like:

Expand Down
3 changes: 2 additions & 1 deletion exercises/nucleotide-codons/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Write a function that returns the name of an amino acid a particular codon, possibly using shorthand, encodes for.
Write a function that returns the name of an amino acid a particular codon,
possibly using shorthand, encodes for.

In DNA sequences of 3 nucleotides, called codons, encode for amino acids. Often
several codons encode for the same amino acid. The International Union of Pure
Expand Down
3 changes: 2 additions & 1 deletion exercises/ocr-numbers/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is
represented, or whether it is garbled.

# Step One

Expand Down
4 changes: 3 additions & 1 deletion exercises/octal/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Convert a octal number, represented as a string (e.g. '1735263'), to its decimal equivalent using first principles (i.e. no, you may not use built-in or external libraries to accomplish the conversion).
Convert an octal number, represented as a string (e.g. '1735263'), to its
decimal equivalent using first principles (i.e. no, you may not use built-in or
external libraries to accomplish the conversion).

Implement octal to decimal conversion. Given an octal input
string, your program should produce a decimal output.
Expand Down
3 changes: 2 additions & 1 deletion exercises/pangram/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma,
"every letter") is a sentence using every letter of the alphabet at least once.
The best known English pangram is "The quick brown fox jumps over the lazy dog."
The best known English pangram is:
> The quick brown fox jumps over the lazy dog.

The alphabet used is ASCII, and case insensitive, from 'a' to 'z'
inclusively.
3 changes: 2 additions & 1 deletion exercises/perfect-numbers/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
Determine if a number is perfect, abundant, or deficient based on
Nicomachus' (60 - 120 CE) classification scheme for natural numbers.

The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9

Expand Down
2 changes: 0 additions & 2 deletions exercises/poker/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Pick the best hand(s) from a list of poker hands.

Write an algorithm to pick the best poker hand(s) from a list.

See [wikipedia](https://en.wikipedia.org/wiki/List_of_poker_hands) for an
overview of poker hands.
5 changes: 3 additions & 2 deletions exercises/protein-translation/description.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Translate RNA sequences into proteins.

Let's translate RNA sequences into proteins. [general ref](http://en.wikipedia.org/wiki/Translation_(biology))

RNA can be broken into three nucleotide sequences called codons, and then translated to a polypeptide like so:

RNA: `"AUGUUUUCU"` => translates to
Expand Down Expand Up @@ -38,3 +36,6 @@ UAU, UAC | Tyrosine
UGU, UGC | Cysteine
UGG | Tryptophan
UAA, UAG, UGA | STOP


Learn more about [protein translation on Wikipedia](http://en.wikipedia.org/wiki/Translation_(biology))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs formatting for width.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rendered view has no width issues?

3 changes: 2 additions & 1 deletion exercises/proverb/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output the full text of this proverbial rhyme.
For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output
the full text of this proverbial rhyme.

For want of a nail the shoe was lost.
For want of a shoe the horse was lost.
Expand Down
6 changes: 4 additions & 2 deletions exercises/pythagorean-triplet/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product a * b * c.

A Pythagorean triplet is a set of three natural numbers, {a, b, c}, for
which,

Expand All @@ -12,3 +10,7 @@ For example,
```
3**2 + 4**2 = 9 + 16 = 25 = 5**2.
```

There exists exactly one Pythagorean triplet for which a + b + c = 1000.

Find the product a * b * c.
3 changes: 2 additions & 1 deletion exercises/queen-attack/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.
Given the position of two queens on a chess board, indicate whether or not they
are positioned so that they can attack each other.

In the game of chess, a queen can attack pieces which are on the same
row, column, or diagonal.
Expand Down
4 changes: 1 addition & 3 deletions exercises/rectangles/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Count the rectangles in an ASCII diagram.

Create a program to count the rectangles in an ASCII diagram like the one below.
Count the rectangles in an ASCII diagram like the one below.

```
+--+
Expand Down
4 changes: 0 additions & 4 deletions exercises/rotational-cipher/description.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.

# Rotational Cipher

Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.

The Caesar cipher is a simple shift cipher that relies on
transposing all the letters in the alphabet using an integer key
between `0` and `26`. Using a key of `0` or `26` will always yield
Expand Down
2 changes: 0 additions & 2 deletions exercises/scale-generator/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Generate musical scales, given a starting note and a set of intervals.

Given a tonic, or starting note, and a set of intervals, generate
the musical scale starting with the tonic and following the
specified interval pattern.
Expand Down
4 changes: 2 additions & 2 deletions exercises/secret-handshake/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.

> There are 10 types of people in the world: Those who understand
> binary, and those who don't.

Expand All @@ -16,6 +14,8 @@ binary decide to come up with a secret "handshake".
10000 = Reverse the order of the operations in the secret handshake.
```

Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs formatting for width.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but not initial duplication related.


Here's a couple of examples:

Given the input 3, the function would return the array
Expand Down
3 changes: 2 additions & 1 deletion exercises/series/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given a string of digits, output all the contiguous substrings of length `n` in that string.
Given a string of digits, output all the contiguous substrings of length `n` in
that string.

For example, the string "49142" has the following 3-digit series:

Expand Down
3 changes: 2 additions & 1 deletion exercises/sieve/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
Use the Sieve of Eratosthenes to find all the primes from 2 up to a given
number.

The Sieve of Eratosthenes is a simple, ancient algorithm for finding all
prime numbers up to any given limit. It does so by iteratively marking as
Expand Down
2 changes: 0 additions & 2 deletions exercises/space-age/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.

Given an age in seconds, calculate how old someone would be on:

- Earth: orbital period 365.25 Earth days, or 31557600 seconds
Expand Down
9 changes: 4 additions & 5 deletions exercises/strain/description.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
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.

Write two functions that each take a function and a list. One of them will
return the list of items for which the passed in function is true, and the
other will return the items for which it is false.
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.

For example, given the collection of numbers:

Expand Down
9 changes: 3 additions & 6 deletions exercises/sublist/description.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Write a function to determine if a list is a sublist of another list.

Write a function that given two lists determines if the first list is
contained within the second list, if the second list is contained within
the first list, if both lists are contained within each other or if none
of these are true.
Given two lists determine if the first list is contained within the second
list, if the second list is contained within the first list, if both lists are
contained within each other or if none of these are true.

Specifically, a list A is a sublist of list B if by dropping 0 or more elements
from the front of B and 0 or more elements from the back of B you get a list
Expand Down
3 changes: 2 additions & 1 deletion exercises/sum-of-multiples/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
Given a number, find the sum of all the multiples of particular numbers up to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost identically repeated at the end of the description. "particular numbers" also seems to be confusing language here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point but I'm not going to change this as part of this PR as it is not related to the initial duplication.

but not including that number.

If we list all the natural numbers up to but not including 20 that are
multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18.
Expand Down
7 changes: 4 additions & 3 deletions exercises/tournament/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Tally the results of a small football competition. Based on an input file
containing which team played against which and what the outcome was
create a file with a table like this:
Tally the results of a small football competition.

Based on an input file containing which team played against which and what the
outcome was, create a file with a table like this:

```
Team | MP | W | D | L | P
Expand Down
4 changes: 1 addition & 3 deletions exercises/transpose/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Take input text and output it transposed.

Given an input text output it transposed.

Roughly explained, the transpose of a matrix:
Expand Down Expand Up @@ -56,4 +54,4 @@ BE

In general, all characters from the input should also be present in the transposed output.
That means that if a column in the input text contains only spaces on its bottom-most row(s),
the corresponding output row should contain the spaces in its right-most column(s).
the corresponding output row should contain the spaces in its right-most column(s).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs formatting for width.

3 changes: 2 additions & 1 deletion exercises/trinary/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Convert a trinary number, represented as a string (e.g. '102012'), to its decimal equivalent using first principles.
Convert a trinary number, represented as a string (e.g. '102012'), to its
decimal equivalent using first principles.

The program should consider strings specifying an invalid trinary as the
value 0.
Expand Down
4 changes: 1 addition & 3 deletions exercises/two-bucket/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Given two buckets of different size, demonstrate how to measure an exact number of liters.

Given two buckets of different size, demonstrate how to measure an exact number of liters by strategically transferring liters of fluid between the buckets.

Since this mathematical problem is fairly subject to interpretation / individual approach, the tests have been written specifically to expect one overarching solution.
Expand Down Expand Up @@ -27,4 +25,4 @@ To conclude, the only valid moves are:
- emptying one bucket and doing nothing to the other
- filling one bucket and doing nothing to the other

Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by [Lindsay](http://lindsaylevine.com).
Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by [Lindsay](http://lindsaylevine.com).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs formatting for width.

6 changes: 2 additions & 4 deletions exercises/word-search/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Create a program to solve a word search puzzle.

In word search puzzles you get a square of letters and have to find specific
words in them.

Expand All @@ -23,5 +21,5 @@ There are several programming languages hidden in the above square.
Words can be hidden in all kinds of directions: left-to-right, right-to-left,
vertical and diagonal.

Create a program that given a puzzle and a list of words returns the location
of the first and last letter of each word.
Given a puzzle and a list of words return the location of the first and last
letter of each word.
2 changes: 1 addition & 1 deletion exercises/zebra-puzzle/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Solve the zebra puzzle.

Each of the five houses is painted a different color, and their
inhabitants are of different national extractions, own different pets,
drink different beverages and smoke different brands of cigarets.
drink different beverages and smoke different brands of cigarettes.

Which of the residents drinks water?
Who owns the zebra?