canBalance function takes an array of numbers and returns true or false based on the following conditions. It returns true if the array can be split at any point with the sum of the numbers on one side equal to the sum of the numbers at the other side. For example, given the array [1, 2, 3, 4, 5, 5], it will return true as the array can be split into [1, 2, 3, 4] and [5, 5] giving a sum of 10 on each side.
-
Notifications
You must be signed in to change notification settings - Fork 0
canBalance function takes an array of numbers and returns true or false based on the following conditions. It returns true if the array can be split at any point with the sum of the numbers on one side equal to the sum of the numbers at the other side. For example, given the array [1, 2, 3, 4, 5, 5], it will return true as the array can be split…
CharlesOkafor91/canBalanceFunction.js
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
canBalance function takes an array of numbers and returns true or false based on the following conditions. It returns true if the array can be split at any point with the sum of the numbers on one side equal to the sum of the numbers at the other side. For example, given the array [1, 2, 3, 4, 5, 5], it will return true as the array can be split…
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published