Codewars: Rust workspace for solving the 'Array Diff' kata
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.
Jim Infield 9593191b62 Update README.md 3 years ago
src initial commit 3 years ago
.gitignore initial commit 3 years ago
Cargo.lock initial commit 3 years ago
Cargo.toml initial commit 3 years ago
README.md Update README.md 3 years ago

README.md

Array Diff

Your goal in this kata is to implement a difference function, which subtracts one list from another and returns the result.

It should remove all values from list a, which are present in list b keeping their order.

array_diff(vec![1,2], vec![1]) == vec![2]

If a value is present in b, all of its occurrences must be removed from the other:

array_diff(vec![1,2,2,2,3], vec![2]) == vec![1,3]