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.
Hey Voile, Thanks for the Doc, Code updated with Random test cases.
Thanks again!!! I have updated my description,
Let me know if there is something which needs to be changed.
If we remove 5 from -55, we are left out with '-', which can't be divisible by 3 ;-) ,so have to return -1.
Thanks for asking, I have added this in description.
Hey, Thanks for your feedback. I have updated the code.
Needs test case
-55
too; there's already a submitted solution that passes on55
but will error out on-55
.It's not really explained why
-55
should return-1
.When all digits are
5
and hence removed, what happens? Is it-0
or-
? But0
is considered in the family of 3, so it should return-55
maybe? What is the actual spec here?Random tests are a mandatory component of all katas. You should start from here:
https://github.com/codingforeveryone/READMEs/blob/master/codewars/random-test-cases-for-complete-beginners.md
???
Also, please organize your description, hone it out and format it properly so it's actually readable and don't look like a pile of incomprehensible patchwork.
This comment is hidden because it contains spoiler information about the solution
Thanks for mentioning. Yes, 0 is divisible by 3 so it is in family of 3.
I have added a note.
Random tests needed.
0
is divisible by3
too, so the expected behavior should be clarified.+1