public/subjects/sums
davhojt 81d7a49cde docs(sums): correct grammar 2022-05-31 08:27:51 +02:00
..
README.md docs(sums): correct grammar 2022-05-31 08:27:51 +02:00

README.md

Sums

Instructions

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] ]