diff options
| author | Federico Igne <git@federicoigne.com> | 2021-11-05 22:58:26 +0000 |
|---|---|---|
| committer | Federico Igne <git@federicoigne.com> | 2021-11-05 23:00:47 +0000 |
| commit | c689e2ad8273b22e1ce8ae4ec58013d3e43010dc (patch) | |
| tree | 83f27a3a0aed3728506da4af301b29ca795ddf68 /rust/anagram/README.md | |
| parent | a43a779ad12b464175f95d9381499fe28510ec09 (diff) | |
| download | exercism-c689e2ad8273b22e1ce8ae4ec58013d3e43010dc.tar.gz exercism-c689e2ad8273b22e1ce8ae4ec58013d3e43010dc.zip | |
[rust] Anagram
Diffstat (limited to 'rust/anagram/README.md')
| -rw-r--r-- | rust/anagram/README.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/rust/anagram/README.md b/rust/anagram/README.md new file mode 100644 index 0000000..e6be820 --- /dev/null +++ b/rust/anagram/README.md | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | # Anagram | ||
| 2 | |||
| 3 | Welcome to Anagram on Exercism's Rust Track. | ||
| 4 | If you need help running the tests or submitting your code, check out `HELP.md`. | ||
| 5 | |||
| 6 | ## Instructions | ||
| 7 | |||
| 8 | An anagram is a rearrangement of letters to form a new word. | ||
| 9 | Given a word and a list of candidates, select the sublist of anagrams of the given word. | ||
| 10 | |||
| 11 | Given `"listen"` and a list of candidates like `"enlists" "google" | ||
| 12 | "inlets" "banana"` the program should return a list containing | ||
| 13 | `"inlets"`. | ||
| 14 | |||
| 15 | The solution is case insensitive, which means `"WOrd"` is the same as `"word"` or `"woRd"`. It may help to take a peek at the [std library](https://doc.rust-lang.org/std/primitive.char.html) for functions that can convert between them. | ||
| 16 | |||
| 17 | The solution cannot contain the input word. A word is always an anagram of itself, which means it is not an interesting result. Given `"hello"` and the list `["hello", "olleh"]` the answer is `["olleh"]`. | ||
| 18 | |||
| 19 | You are going to have to adjust the function signature provided in the stub in order for the lifetimes to work out properly. This is intentional: what's there demonstrates the basics of lifetime syntax, and what's missing teaches how to interpret lifetime-related compiler errors. | ||
| 20 | |||
| 21 | Try to limit case changes. Case changes are expensive in terms of time, so it's faster to minimize them. | ||
| 22 | |||
| 23 | If sorting, consider [sort_unstable](https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable) which is typically faster than stable sorting. When applicable, unstable sorting is preferred because it is generally faster than stable sorting and it doesn't allocate auxiliary memory. | ||
| 24 | |||
| 25 | ## Source | ||
| 26 | |||
| 27 | ### Created by | ||
| 28 | |||
| 29 | - @EduardoBautista | ||
| 30 | |||
| 31 | ### Contributed to by | ||
| 32 | |||
| 33 | - @andrewclarkson | ||
| 34 | - @ashleygwilliams | ||
| 35 | - @bobahop | ||
| 36 | - @chancancode | ||
| 37 | - @ClashTheBunny | ||
| 38 | - @coriolinus | ||
| 39 | - @cwhakes | ||
| 40 | - @Dimkar3000 | ||
| 41 | - @EduardoBautista | ||
| 42 | - @efx | ||
| 43 | - @ErikSchierboom | ||
| 44 | - @gris | ||
| 45 | - @IanWhitney | ||
| 46 | - @kytrinyx | ||
| 47 | - @lutostag | ||
| 48 | - @mkantor | ||
| 49 | - @nfiles | ||
| 50 | - @petertseng | ||
| 51 | - @pminten | ||
| 52 | - @quartsize | ||
| 53 | - @rofrol | ||
| 54 | - @stevejb71 | ||
| 55 | - @stringparser | ||
| 56 | - @xakon | ||
| 57 | - @ZapAnton | ||
| 58 | |||
| 59 | ### Based on | ||
| 60 | |||
| 61 | Inspired by the Extreme Startup game - https://github.com/rchatley/extreme_startup \ No newline at end of file | ||
