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.
not the best solution and not very clever.
sum
for the result of the addition makes the code more self explenatoryOkay, thanks for that !
Great solution but it has me a little confused.
How does the last section of code convert the sum into binary ?
Thanks
This is how people from india code. Try taking over one of those projects lol.
I agree with you, but it's just not in the "clever" category.
You will want to sort the word first for time complexity sake.
Wouldn't that depend on what your expected behavior on having a non-integer input is? Depending on context, returning without raising an exception could just create problems.
\m/
Just looks to be a bug he fails to respond to or fix. I also split with ' ' and then used Number() for each indice. All tests pass except his last one.
Wouldn't this method fail if either a or b is nil ? I noticed that a lot of kata solutions don't take those cases into account. Whilt adding a simple guard clause:
return unless a && b
would cover this.Because one-liners are a way to push you harder with some extra challenge, plus it is still competitive coding: you are meant to show off a bit :p
But thanks for taking your time considering my work :)
Why make it 1 line though? Seems antithetical to general best practices.
I'll work on that ;)
too few semicolons for my taste ;-)
My last test is also failing but the original tie in the original 3 tests is fine
Loading more items...