From 81d7a49cdecd953a57e281c3919d6bd60ee25d0c Mon Sep 17 00:00:00 2001 From: davhojt Date: Mon, 2 May 2022 12:30:23 +0100 Subject: [PATCH] docs(sums): correct grammar --- subjects/sums/README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/subjects/sums/README.md b/subjects/sums/README.md index 56f16051..ed320099 100644 --- a/subjects/sums/README.md +++ b/subjects/sums/README.md @@ -2,12 +2,14 @@ ### Instructions -Create a function called `sums` that receives a number and returns its -partitions. -A partition of a number is a group of numbers that its sum is equal to that -number. -Sums must ignore duplicates ([1,2] and [2,1] are duplicates). -Sums must return sorted array of sorted partitions. +Create a function named `sums` that accepts a number and returns its partitions. + +A partition is a group of numbers, where the sum of the partition is equal to the number argument. +Duplicate partitions are not allowed. `[1, 2]` and `[2, 1]` are considered duplicates. +The array of partitions must be sorted. Example: -sums(4) = [ [1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2] ] + +```js +sums(4) // [ [1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2] ] +```