From c50fa2621c22759d35c9aebe63e71e30d5697109 Mon Sep 17 00:00:00 2001 From: davhojt Date: Mon, 30 May 2022 13:14:02 +0200 Subject: [PATCH] docs(searching) correct grammar --- subjects/searching/README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/subjects/searching/README.md b/subjects/searching/README.md index 16323aef..db9f793e 100644 --- a/subjects/searching/README.md +++ b/subjects/searching/README.md @@ -2,14 +2,8 @@ ### Instructions -In this exercise you will have to complete the function `search`. -This **function** receives an array and a key of `i32`, then it will return the position -of the given key in the array. -Only arrays with uniques keys will be tested. - -### Notions - -- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html) +Complete the function `search`. It should return the index of the element which matches `key` in the array. +> Only arrays with unique elements will be tested. ### Expected functions @@ -43,3 +37,7 @@ $ cargo run the element 6 is in the position Some(3) in the array [1, 3, 4, 6, 8, 9, 11] $ ``` + +### Notions + +- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html)