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.
This comment is hidden because it contains spoiler information about the solution
I'm not sure if I understood you correctly, but this is, in fact, O(n^2) too.
ugh I wasn't sure you could use modulo in bash
This comment is hidden because it contains spoiler information about the solution
surprised i had to scroll so far down to find a solution using filter, which was my first instinct until I couldn't remember the syntax so I just went for comprehensions instead.
i love it! this is poetry
Single colon works fine here.
just another "god damnit why couldn't I think of that" moment on codewars
i agree I think this is the most elegant solution.
eval does feel kind of cheap. I had the opposite experience sort of. I just retraine on this kata and I used eval() and when I went and looked at my first solution I was like, "Holy shit, did I really write this?!" I think i did since it didn't get any variations. Plus eval is almost never a good idea for security reasons.
This comment is hidden because it contains spoiler information about the solution
the result will only be zero if the number is an integer. That is what makes this solution so clever, if the square root is not an integer, then the number is not square.
ahhh this seems so obvious in retrospect i love to hate it!!
damn this is one of the best solutions of all time
Loading more items...