-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
148 changed files
with
853 additions
and
868 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 |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
], | ||
"exemplar": [ | ||
".meta/Exemplar.scala" | ||
], | ||
"invalidator": [ | ||
"build.sbt" | ||
] | ||
} | ||
} |
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -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"`. |
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 |
---|---|---|
@@ -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 |
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
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
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
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 |
---|---|---|
@@ -1,27 +1,12 @@ | ||
# Instructions | ||
|
||
Simulate a bank account supporting opening/closing, withdrawals, 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 | ||
can charge against the account. | ||
A bank account can be accessed in multiple ways. | ||
Clients can make deposits and withdrawals using the internet, mobile phones, etc. | ||
Shops can charge against the account. | ||
|
||
Create an account that can be accessed from multiple threads/processes | ||
(terminology depends on your programming language). | ||
Create an account that can be accessed from multiple threads/processes (terminology depends on your programming language). | ||
|
||
It should be possible to close an account; operations against a closed | ||
account must fail. | ||
|
||
## Instructions | ||
|
||
Run the test file, and fix each of the errors in turn. When you get the | ||
first test to pass, go to the first pending or skipped test, and make | ||
that pass as well. When all of the tests are passing, feel free to | ||
submit. | ||
|
||
Remember that passing code is just the first step. The goal is to work | ||
towards a solution that is as readable and expressive as you can make | ||
it. | ||
|
||
Have fun! | ||
It should be possible to close an account; operations against a closed account must fail. |
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
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
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
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
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
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
Oops, something went wrong.