docs(string_permutation): correct grammar

This commit is contained in:
davhojt 2022-05-24 17:43:43 +03:00 committed by Dav Hojt
parent 7fd4497f62
commit b2cb2cbf31
1 changed files with 6 additions and 7 deletions

View File

@ -2,14 +2,9 @@
### Instructions
Define the **function** `is_permutation` that returns true if:
Define the **function** `is_permutation`, that returns `true` if the string `s1` is a permutation of `s2`.
- the string `s1` is a permutation of `s2`, otherwise it returns false.
- `s1` is a permutation of `s2` if all the elements in `s1` appear the same number of times in `s2` and all the characters in `s1` appear in `s2` even if they are in different order.
### Notions
- [hash maps](https://doc.rust-lang.org/book/ch08-03-hash-maps.html)
`s1` is a permutation of `s2` if all the elements in `s1` appear the same number of times in `s2`, and all the characters in `s1` appear in `s2` even if they are in different order.
### Expected Function
@ -44,3 +39,7 @@ $ cargo run
Is `thought` a permutation of `thougth`? = true
$
```
### Notions
- [hash maps](https://doc.rust-lang.org/book/ch08-03-hash-maps.html)