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.
Please don't post solutions in the discourse. See https://docs.codewars.com/training/troubleshooting#post-discourse.
This comment is hidden because it contains spoiler information about the solution
all 3 forked and approved
Yes, you are right. The Task says "Given a positive number, find ...", I've overlooked this. Thank you
Approved the above fork
Java Fork
C++ Fork
Haskell fork
All languages should have the edge case of
n = 1
added (Certain languages have built-in range functions with astep
parameter and will not work whenstep
> theend
parameter)Lua translation!
8 kyu.
Thank you! Seems like i took into consideration the middle numbers in even digits as you mentioned, thanks for the reply!
Not a kata issue. Example above consists of even digit count, so the
3
and9
at the middle are not considered. So,5 + 6 + 2
-->13
and8 + 1 + 4
-->13
which are equal for both ends, so it is indeedBalanced
One of the tests for Ruby expects
Balanced
when it should beBot Balanced
.Test.assert_equals(balanced_num(56239814), "Balanced")
Can't solve this kata because of this, please fix! Or let me know if I'm in the wrong!
In C
teams
is already initialized with zeros in all tests. Since it's not documented, there should be tests where it's not initialized.Loading more items...