From 37cdae170e963a87c9931fa094535d928d134061 Mon Sep 17 00:00:00 2001 From: Pav01Founders <92518689+Pav01Founders@users.noreply.github.com> Date: Thu, 14 Oct 2021 13:38:59 +0100 Subject: [PATCH 1/2] Update README.md Grammatical changes to the instructions. --- subjects/issorted/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subjects/issorted/README.md b/subjects/issorted/README.md index 819c9917f..323073132 100644 --- a/subjects/issorted/README.md +++ b/subjects/issorted/README.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `IsSorted` that returns `true`, if the slice of `int` is sorted, and that returns `false` otherwise. +Write a function `IsSorted` that returns `true`, if the slice of `int` is sorted, otherwise returns 'false'. -The function passed in parameter returns a positive `int` if `a` (the first argument) is superior to `b` (the second argument), it returns `0` if they are equal and it returns a negative `int` otherwise. +The function passed in the parameter returns a positive `int` if `a` (the first argument) is greater than to `b` (the second argument), it returns `0` if they are equal and it returns a negative `int` otherwise. To do your testing you have to write your own `f` function. @@ -16,7 +16,7 @@ func IsSorted(f func(a, b int) int, a []int) bool { } ``` -### Usage +### Testing Here is a possible program to test your function (without `f`): From 9a30f227f24bcbb2b517ad52e79e2e1d8ebfd519 Mon Sep 17 00:00:00 2001 From: MSilva95 <53977751+MSilva95@users.noreply.github.com> Date: Wed, 27 Oct 2021 16:41:21 +0100 Subject: [PATCH 2/2] Changing testing to usage --- subjects/issorted/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/issorted/README.md b/subjects/issorted/README.md index 323073132..7cc0097cf 100644 --- a/subjects/issorted/README.md +++ b/subjects/issorted/README.md @@ -2,7 +2,7 @@ ### Instructions -Write a function `IsSorted` that returns `true`, if the slice of `int` is sorted, otherwise returns 'false'. +Write a function `IsSorted` that returns `true`, if the slice of `int` is sorted, otherwise returns `false`. The function passed in the parameter returns a positive `int` if `a` (the first argument) is greater than to `b` (the second argument), it returns `0` if they are equal and it returns a negative `int` otherwise. @@ -16,7 +16,7 @@ func IsSorted(f func(a, b int) int, a []int) bool { } ``` -### Testing +### Usage Here is a possible program to test your function (without `f`):