Going through exercism. Tackling rust track initially
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Akshay Dixit 3ebe3ca667 anagram 4 years ago
..
src anagram 4 years ago
tests anagram 4 years ago
Cargo.toml anagram 4 years ago
HELP.md anagram 4 years ago
README.md anagram 4 years ago

README.md

Anagram

Welcome to Anagram on Exercism's Rust Track. If you need help running the tests or submitting your code, check out HELP.md.

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.

Given "listen" and a list of candidates like "enlists" "google" "inlets" "banana" the program should return a list containing "inlets".

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 for functions that can convert between them.

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

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.

Try to limit case changes. Case changes are expensive in terms of time, so it's faster to minimize them.

If sorting, consider 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.

Source

Created by

Contributed to by

Based on

Inspired by the Extreme Startup game - https://github.com/rchatley/extreme_startup