-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synced Anagram instructions to problem specifications.
- Loading branch information
Showing
1 changed file
with
5 additions
and
6 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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
# Instructions | ||
|
||
Your task is to, given a target word and a set of candidate words, to find the subset of the candidates that are anagrams of the target. | ||
Given a target word and one or more candidate words, your task is to find the candidates that are anagrams of the target. | ||
|
||
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"`. | ||
|
||
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. | ||
The target word and candidate words are made up 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 words you need to find should be taken from the candidate words, using the same letter case. | ||
|
||
Given the target `"stone"` and candidates `"stone"`, `"tones"`, `"banana"`, `"tons"`, `"notes"`, `"Seton"`, the anagram set is `"tones"`, `"notes"`, `"Seton"`. | ||
Given the target `"stone"` and the candidate words `"stone"`, `"tones"`, `"banana"`, `"tons"`, `"notes"`, and `"Seton"`, the anagram words you need to find are `"tones"`, `"notes"`, and `"Seton"`. |