Skip to content

Commit

Permalink
sync docs and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
BNAndras committed Jan 7, 2024
1 parent 4dde59c commit cc37864
Show file tree
Hide file tree
Showing 47 changed files with 261 additions and 161 deletions.
8 changes: 2 additions & 6 deletions exercises/practice/accumulate/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Instructions

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 All @@ -21,6 +18,5 @@ 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!
Keep your hands off that collect/map/fmap/whatchamacallit functionality provided by your standard library!
Solve this one yourself using other basic tools instead.
5 changes: 4 additions & 1 deletion exercises/practice/accumulate/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Accumulate.rei"
]
},
"source": "Conversation with James Edward Gray II",
"source_url": "https://twitter.com/jeg2"
"source_url": "http://graysoftinc.com/"
}
13 changes: 11 additions & 2 deletions exercises/practice/acronym/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ 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).
Help generate some jargon by writing a program that converts a long name like Portable Network Graphics to its acronym (PNG).

Punctuation is handled as follows: hyphens are word separators (like whitespace); all other punctuation can be removed from the input.

For example:

| Input | Output |
| ------------------------- | ------ |
| As Soon As Possible | ASAP |
| Liquid-crystal display | LCD |
| Thank George It's Friday! | TGIF |
5 changes: 4 additions & 1 deletion exercises/practice/acronym/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Convert a long phrase to its acronym",
"blurb": "Convert a long phrase to its acronym.",
"authors": [
"gabrielperales"
],
Expand All @@ -19,6 +19,9 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Acronym.rei"
]
},
"source": "Julien Vanier",
Expand Down
25 changes: 13 additions & 12 deletions exercises/practice/all-your-base/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,32 @@

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**.
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)
## About [Positional Notation][positional-notation]

In positional notation, a number in base **b** can be understood as a linear
combination of powers of **b**.
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:
The number 42, _in base 10_, means:

(4 * 10^1) + (2 * 10^0)
`(4 * 10^1) + (2 * 10^0)`

The number 101010, *in base 2*, means:
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)
`(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:
The number 1120, _in base 3_, means:

(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)
`(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!*
_Yes. Those three numbers above are exactly the same. Congratulations!_

[positional-notation]: https://en.wikipedia.org/wiki/Positional_notation
3 changes: 3 additions & 0 deletions exercises/practice/all-your-base/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/AllYourBase.rei"
]
}
}
27 changes: 12 additions & 15 deletions exercises/practice/allergies/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

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).
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)
- 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.

Expand All @@ -24,7 +22,6 @@ 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.
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.
7 changes: 5 additions & 2 deletions exercises/practice/allergies/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Allergies.rei"
]
},
"source": "Jumpstart Lab Warm-up",
"source_url": "http://jumpstartlab.com"
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
"source_url": "https://turing.edu"
}
15 changes: 10 additions & 5 deletions exercises/practice/anagram/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Instructions

An anagram is a rearrangement of letters to form a new word.
Given a word and a list of candidates, select the sublist of anagrams of the given word.
An anagram is a rearrangement of letters to form a new word: for example `"owns"` is an anagram of `"snow"`.
A word is not its own anagram: for example, `"stop"` is not an anagram of `"stop"`.

Given `"listen"` and a list of candidates like `"enlists" "google"
"inlets" "banana"` the program should return a list containing
`"inlets"`.
Given a target word and a set of candidate words, this exercise requests the anagram set: the subset of the candidates that are anagrams of the target.

The target and candidates are words of one or more ASCII alphabetic characters (`A`-`Z` and `a`-`z`).
Lowercase and uppercase characters are equivalent: for example, `"PoTS"` is an anagram of `"sTOp"`, but `StoP` is not an anagram of `sTOp`.
The anagram set is the subset of the candidate set that are anagrams of the target (in any order).
Words in the anagram set should have the same letter case as in the candidate set.

Given the target `"stone"` and candidates `"stone"`, `"tones"`, `"banana"`, `"tons"`, `"notes"`, `"Seton"`, the anagram set is `"tones"`, `"notes"`, `"Seton"`.
3 changes: 3 additions & 0 deletions exercises/practice/anagram/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Anagram.rei"
]
},
"source": "Inspired by the Extreme Startup game",
Expand Down
8 changes: 5 additions & 3 deletions exercises/practice/armstrong-numbers/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Instructions

An [Armstrong number](https://en.wikipedia.org/wiki/Narcissistic_number) is a number that is the sum of its own digits each raised to the power of the number of digits.
An [Armstrong number][armstrong-number] is a number that is the sum of its own digits each raised to the power of the number of digits.

For example:

- 9 is an Armstrong number, because `9 = 9^1 = 9`
- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 1`
- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1`
- 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
- 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`

Write some code to determine whether a number is an Armstrong number.

[armstrong-number]: https://en.wikipedia.org/wiki/Narcissistic_number
5 changes: 4 additions & 1 deletion exercises/practice/armstrong-numbers/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Determine if a number is an Armstrong number",
"blurb": "Determine if a number is an Armstrong number.",
"authors": [
"tejasbubane"
],
Expand All @@ -19,6 +19,9 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/ArmstrongNumbers.rei"
]
},
"source": "Wikipedia",
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/binary-search/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Binary search only works when a list has been sorted.

The algorithm looks like this:

- Find the middle element of a *sorted* list and compare it with the item we're looking for.
- Find the middle element of a _sorted_ list and compare it with the item we're looking for.
- If the middle element is our item, then we're done!
- If the middle element is greater than our item, we can eliminate that element and all the elements **after** it.
- If the middle element is less than our item, we can eliminate that element and all the elements **before** it.
Expand Down
5 changes: 4 additions & 1 deletion exercises/practice/binary-search/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/BinarySearch.rei"
]
},
"source": "Wikipedia",
"source_url": "http://en.wikipedia.org/wiki/Binary_search_algorithm"
"source_url": "https://en.wikipedia.org/wiki/Binary_search_algorithm"
}
5 changes: 4 additions & 1 deletion exercises/practice/bob/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Bob.rei"
]
},
"source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.",
"source_url": "http://pine.fm/LearnToProgram/?Chapter=06"
"source_url": "https://pine.fm/LearnToProgram/?Chapter=06"
}
9 changes: 3 additions & 6 deletions exercises/practice/change/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Instructions

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.
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

- An input of 15 with [1, 5, 10, 25, 100] should return one nickel (5)
and one dime (10) or [5, 10]
- An input of 40 with [1, 5, 10, 25, 100] should return one nickel (5)
and one dime (10) and one quarter (25) or [5, 10, 25]
- An input of 15 with [1, 5, 10, 25, 100] should return one nickel (5) and one dime (10) or [5, 10]
- An input of 40 with [1, 5, 10, 25, 100] should return one nickel (5) and one dime (10) and one quarter (25) or [5, 10, 25]

## Edge cases

Expand Down
5 changes: 4 additions & 1 deletion exercises/practice/change/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Correctly determine change to be given using the least number of coins",
"blurb": "Correctly determine change to be given using the least number of coins.",
"authors": [
"stevejb71"
],
Expand All @@ -18,6 +18,9 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Change.rei"
]
},
"source": "Software Craftsmanship - Coin Change Kata",
Expand Down
11 changes: 6 additions & 5 deletions exercises/practice/hello-world/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Instructions

The classical introductory exercise. Just say "Hello, World!".
The classical introductory exercise.
Just say "Hello, World!".

["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
the traditional first program for beginning programming in a new language
or environment.
["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment.

The objectives are simple:

- Write a function that returns the string "Hello, World!".
- Modify the provided code so that it produces the string "Hello, World!".
- Run the test suite and make sure that it succeeds.
- Submit your solution and check it at the website.

If everything goes well, you will be ready to fetch your first real exercise.

[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program
7 changes: 5 additions & 2 deletions exercises/practice/hello-world/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "The classical introductory exercise. Just say \"Hello, World!\"",
"blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".",
"authors": [
"tejasbubane"
],
Expand All @@ -18,8 +18,11 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/HelloWorld.rei"
]
},
"source": "This is an exercise to introduce users to using Exercism",
"source_url": "http://en.wikipedia.org/wiki/%22Hello,_world!%22_program"
"source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program"
}
4 changes: 2 additions & 2 deletions exercises/practice/isogram/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Determine if a word or phrase is an isogram.

An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.
An isogram (also known as a "non-pattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.

Examples of isograms:

Expand All @@ -11,4 +11,4 @@ Examples of isograms:
- downstream
- six-year-old

The word *isograms*, however, is not an isogram, because the s repeats.
The word _isograms_, however, is not an isogram, because the s repeats.
3 changes: 3 additions & 0 deletions exercises/practice/isogram/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
],
"example": [
".meta/src/Example.re"
],
"editor": [
"src/Isogram.rei"
]
},
"source": "Wikipedia",
Expand Down
12 changes: 5 additions & 7 deletions exercises/practice/leap/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ on every year that is evenly divisible by 4
unless the year is also evenly divisible by 400
```

For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap
year, but 2000 is.
For example, 1997 is not a leap year, but 1996 is.
1900 is not a leap year, but 2000 is.

## Notes

Though our exercise adopts some very simple rules, there is more to
learn!
Though our exercise adopts some very simple rules, there is more to learn!

For a delightful, four minute explanation of the whole leap year
phenomenon, go watch [this youtube video][video].
For a delightful, four minute explanation of the whole leap year phenomenon, go watch [this youtube video][video].

[video]: http://www.youtube.com/watch?v=xX96xng7sAE
[video]: https://www.youtube.com/watch?v=xX96xng7sAE
Loading

0 comments on commit cc37864

Please sign in to comment.