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.
I'm wondering if this kata should be adjusted.. At least the ruby version, I'm browsing the solutions and not a single one is actually solving the kata, they are all just variations of gaming the system to allow the native '+' function to work.
I got something working for adding positive numbers, but negatives are much harder. Especially when there's no way to add the "-" to the final result without triggering the "no +/-" rule...
I see it's very similar, but not available in Ruby. Am I able to add a ruby version to that kata?
Ah, thanks for pointing that out, fixed now
This blows my mind.
Nice job!
Codewars says 2 people have successfully completed this in ruby, could one of those people confirm the description?
I feel like if I'm the only one unclear, it would be a question, but since there are so many comments about the vagueness of the problem, I feel like it is a genuine issue
As pretty as a one-liner is, this answer would be amazing if put into heavily commented 3 or 4 lines. Nice idea, to scan into arrays of X and / sequences!
This comment is hidden because it contains spoiler information about the solution
You've changed it in the tests, but please also change it for the default code provided (suggesting the method name, then testing another method name, is a pretty mean trick)
You're right,
s.split.all? { |w| numbers.include?(w) }
is cleaner, I didn't knowall?
could receive a block.Your second suggestion, I know it's faster, but unless you are doing a few thousand/million iterations, the speed wont be noticeable. The code I wrote feels more human readable, which makes it more valuable code in my books.
Thanks! This is my first authored kata. I fixed up the tests and tweaked the solution (I'm using the gsub route).
https://www.codewars.com/kata/reviews/55e345c0294e8a1d87000036/groups/58e37502d4440ad13a0006aa
Found a similar cheat to another challenge. Turns out it's the same person.
https://www.codewars.com/kata/reviews/58c9f332a677713d6f000115/groups/58e4dd466caed00c24000675
This user didn't even try the kata, but just overrode all
==
functions to return true...Ruby solvers—it's important to realise the fitness method returns fractions, ugh that held me up for hours.
This comment is hidden because it contains spoiler information about the solution
Loading more items...