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.
Why not use something like abs()?
This comment is hidden because it contains spoiler information about the solution
You are correct. It's been a while since I've been on this site, but looking at my posted solution now; wow I can't believe I thought this would work. Thanks for pointing it out!
No, you're not missing anything. The Python test cases are too easy :/.
I dont think this solution would work actually. Mod 2 only tells if something is odd or even. Wouldnt this give a wrong answer for x=6 for example? Maybe Im just missing something.
That can be a false positive if you have words that have all the same letters, but not necessarily the same count of each letter.
"headed" versus "ahead"
'in' is wrong in this case, you only want to check the last character. And yes, endswith should be faster, it only checks the end of the string ('in' will check the whole string).
This is an interesting approach. Is the endswith(var) method
faster that stating: '_' in logins?
Ahhhhhhhhhhhh. Nice job, this looks very clean.
I enjoyed this solution quite a bit actually. I implemented it by using an
anonimous function to add and list comprehension to remove that "-" in there.
Altough I have not ran any sort of benchmarks. Good job!
This is indeed clever, I did not know about the builtin module.
But isn't that sort of taking a shortcut?
This comment is hidden because it contains spoiler information about the solution