-
-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #694 from exercism/generate-readme
Generate exercise READMEs from templates
- Loading branch information
Showing
164 changed files
with
5,616 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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. | ||
|
||
Given the collection of numbers: | ||
|
||
- 1, 2, 3, 4, 5 | ||
|
||
And the operation: | ||
|
||
- square a number (`x => x * x`) | ||
|
||
Your code should be able to produce the collection of squares: | ||
|
||
- 1, 4, 9, 16, 25 | ||
|
||
Check out the test suite to see the expected function signature. | ||
|
||
## Restrictions | ||
|
||
Keep your hands off that collect/map/fmap/whatchamacallit functionality | ||
provided by your standard library! | ||
Solve this one yourself using other basic tools instead. | ||
|
||
Lisp specific: it's perfectly fine to use `MAPCAR` or the equivalent, | ||
as this is idiomatic Lisp, not a library function. | ||
|
||
|
||
To run the tests: | ||
|
||
```sh | ||
$ gradle test | ||
``` | ||
|
||
For more detailed info about the Java track see the [help page](http://exercism.io/languages/java). | ||
|
||
|
||
## Source | ||
|
||
Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2) | ||
|
||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Acronym | ||
|
||
Convert a phrase to its acronym. | ||
|
||
Techies love their TLA (Three Letter Acronyms)! | ||
|
||
Help generate some jargon by writing a program that converts a long name | ||
like Portable Network Graphics to its acronym (PNG). | ||
|
||
|
||
|
||
To run the tests: | ||
|
||
```sh | ||
$ gradle test | ||
``` | ||
|
||
For more detailed info about the Java track see the [help page](http://exercism.io/languages/java). | ||
|
||
|
||
## Source | ||
|
||
Julien Vanier [https://github.com/monkbroc](https://github.com/monkbroc) | ||
|
||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# All Your Base | ||
|
||
Convert a number, represented as a sequence of digits in one base, to any other base. | ||
|
||
Implement general base conversion. Given a number in base **a**, | ||
represented as a sequence of digits, convert it to base **b**. | ||
|
||
## Note | ||
- Try to implement the conversion yourself. | ||
Do not use something else to perform the conversion for you. | ||
|
||
## About [Positional Notation](https://en.wikipedia.org/wiki/Positional_notation) | ||
|
||
In positional notation, a number in base **b** can be understood as a linear | ||
combination of powers of **b**. | ||
|
||
The number 42, *in base 10*, means: | ||
|
||
(4 * 10^1) + (2 * 10^0) | ||
|
||
The number 101010, *in base 2*, means: | ||
|
||
(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0) | ||
|
||
The number 1120, *in base 3*, means: | ||
|
||
(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0) | ||
|
||
I think you got the idea! | ||
|
||
|
||
*Yes. Those three numbers above are exactly the same. Congratulations!* | ||
|
||
|
||
To run the tests: | ||
|
||
```sh | ||
$ gradle test | ||
``` | ||
|
||
For more detailed info about the Java track see the [help page](http://exercism.io/languages/java). | ||
|
||
|
||
|
||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Allergies | ||
|
||
Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies. | ||
|
||
An allergy test produces a single numeric score which contains the | ||
information about all the allergies the person has (that they were | ||
tested for). | ||
|
||
The list of items (and their value) that were tested are: | ||
|
||
* eggs (1) | ||
* peanuts (2) | ||
* shellfish (4) | ||
* strawberries (8) | ||
* tomatoes (16) | ||
* chocolate (32) | ||
* pollen (64) | ||
* cats (128) | ||
|
||
So if Tom is allergic to peanuts and chocolate, he gets a score of 34. | ||
|
||
Now, given just that score of 34, your program should be able to say: | ||
|
||
- Whether Tom is allergic to any one of those allergens listed above. | ||
- All the allergens Tom is allergic to. | ||
|
||
Note: a given score may include allergens **not** listed above (i.e. | ||
allergens that score 256, 512, 1024, etc.). Your program should | ||
ignore those components of the score. For example, if the allergy | ||
score is 257, your program should only report the eggs (1) allergy. | ||
|
||
|
||
|
||
To run the tests: | ||
|
||
```sh | ||
$ gradle test | ||
``` | ||
|
||
For more detailed info about the Java track see the [help page](http://exercism.io/languages/java). | ||
|
||
|
||
## Source | ||
|
||
Jumpstart Lab Warm-up [http://jumpstartlab.com](http://jumpstartlab.com) | ||
|
||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Anagram | ||
|
||
Given a word and a list of possible anagrams, select the correct sublist. | ||
|
||
Given `"listen"` and a list of candidates like `"enlists" "google" | ||
"inlets" "banana"` the program should return a list containing | ||
`"inlets"`. | ||
|
||
|
||
To run the tests: | ||
|
||
```sh | ||
$ gradle test | ||
``` | ||
|
||
For more detailed info about the Java track see the [help page](http://exercism.io/languages/java). | ||
|
||
|
||
## Source | ||
|
||
Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup) | ||
|
||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Atbash Cipher | ||
|
||
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East. | ||
|
||
The Atbash cipher is a simple substitution cipher that relies on | ||
transposing all the letters in the alphabet such that the resulting | ||
alphabet is backwards. The first letter is replaced with the last | ||
letter, the second with the second-last, and so on. | ||
|
||
An Atbash cipher for the Latin alphabet would be as follows: | ||
|
||
```plain | ||
Plain: abcdefghijklmnopqrstuvwxyz | ||
Cipher: zyxwvutsrqponmlkjihgfedcba | ||
``` | ||
|
||
It is a very weak cipher because it only has one possible key, and it is | ||
a simple monoalphabetic substitution cipher. However, this may not have | ||
been an issue in the cipher's time. | ||
|
||
Ciphertext is written out in groups of fixed length, the traditional group size | ||
being 5 letters, and punctuation is excluded. This is to make it harder to guess | ||
things based on word boundaries. | ||
|
||
## Examples | ||
- Encoding `test` gives `gvhg` | ||
- Decoding `gvhg` gives `test` | ||
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog` | ||
|
||
|
||
To run the tests: | ||
|
||
```sh | ||
$ gradle test | ||
``` | ||
|
||
For more detailed info about the Java track see the [help page](http://exercism.io/languages/java). | ||
|
||
|
||
## Source | ||
|
||
Wikipedia [http://en.wikipedia.org/wiki/Atbash](http://en.wikipedia.org/wiki/Atbash) | ||
|
||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{ .Spec.Name }} | ||
|
||
{{ .Spec.Description -}} | ||
{{- with .Hints }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .TrackInsert }} | ||
{{ . }} | ||
{{ end }} | ||
{{- with .Spec.Credits -}} | ||
## Source | ||
|
||
{{ . }} | ||
{{ end }} | ||
## Submitting Incomplete Solutions | ||
It's possible to submit an incomplete solution so you can see how others have completed the exercise. | ||
|
Oops, something went wrong.