Skip to content

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…

Notifications You must be signed in to change notification settings

CharlesOkafor91/canBalanceFunction.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

canBalanceFunction.js

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.

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

No packages published