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.
or are you talking about aosphyma's response?
I don't see how. Where will it match letters?
But this solution match strings like "abcd3.56fg"
Nice job. I always like to see a little recursion used when it can.
I think this solution is the ultimately right one!
I thinkt it's better to use array then List, becuz that is written that every town has a number for every month. (there are 12 mounts always). Second note from me is that ya call parseTemp() 2 times in variance().
Why are you doing this?
if (n % factor == 0) {
myK++;
n = n / factor;
while (n % factor == 0) {
myK++;
n = n / factor;
}
}
Instead of :
while (n % factor == 0) {
myK++;
n = n / factor;
}
Same for when eliminating the twos...you can just replace the if bocks with the whiles, and you get the same thing but shorter. Also could be tweaked in some places, see my solution, which is just small improvements on yours. Nice one :)
Yes I know but when you have the array you can have the count which was my first idea. The description is clear about what you are asking for. Changing 8 languages is a lot of work:-) I will do it when I have time! Thanks for your post but a suggestion would have been better than an issue.
Good kata! Minor issue: the method countKprimes() is poorly named. It seems to return a count but it returns an array. Maybe call it findKPrimes() or buildKPrimes().
Suggestion to improve the line "And 216 / 12 = 18 (integer) and 18.12 = 216"
How about "And 12 evenly divides 216: 216 / 12 = 18"
Title suggestion: "Sum of Factors Evenly Divides Cube"
Method returns Boolean; probably should be boolean.