Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Think of it as a math problem, moreso than a programming problem. It's really both, but the solution doesn't require fancy JS methods (and frankly, doesn't work with them).
Should
13
be balanced? The tests seem to think so, but if I understand the problem explanation correctly, it shouldn't be because1 != 3
. Same with56239814
.5+6+2+3 = 16
and9+8+1+4 = 22
.16 != 22
so shouldn't the correct answer be"Not Balanced"
?Note: after much deliberation, I removed the spoiler tag because anyone who opens the kata can see the sample tests, so I assume they don't count.
Not really. This has arrays within an array, and the goal is to find the minimum in each array and add them. Neither of those katas have the same objective, or even work with the same dimension of array.
This comment is hidden because it contains spoiler information about the solution
You don't need both 'return 1;' statements. If you have two or more case statements in a row with no return or break statement, the next statement will handle those cases together. In other words:
case 1:
case 2: return 1;
functions the same as:
case 1: return 1;
case 2: return 1;
This is an interesting solution.