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.
A tip: you could just replace
list
withsorted
to make it shortersort = lambda x: ''.join(sorted(filter(str.isalpha, x)) + sorted(filter(str.isdigit, x)))
And it's also sorting less element
My bad, gonna fix it now. Thanks!
Edit: Done! And added 2 more test case (0 and 100 USD)
Any form of whitespace should only be removed if it is trailing behind the sentence
This solution teaches me how to use a made function (Not the lambda one) on an Arrays stream's map
Had to implement all those function from scratch as I hate and suck at
Java
lmao. My previous code submission was from the golf one (Not allowed apparently).Straight away
Edit: Done!
No, it's not. That's
Javascript
's function you are referring to.Edit: And as I've said before this kata haven't yet translated to Python
Were you not in the python section of the training page?
https://www.codewars.com/kata/582a53ed261c2af9d200018c/train/pythonEdit: There haven't been a Python translation on this kata
You know i guess it's mostly because of the title
Regex validate PIN code
should be abcdefghijklmnopqrstuvwxyz: 'abcdefghijklmnopqrstuvwxyz' should equal 'abcdefghijklmnopqrstuvwxy'
The assertion in
Test Case
is flippedThanks to whom approved it and ejini for telling me! (Man, the approval notification didn't work)
And I think this is a spoiler comment. Flag your code as spoiler next time ;)
Java Updated Fork
Yep since the constraints are in range of 1-20 anyway.
Edit: Is it bad? And should I change it?
Please don't post your solution on
Discourse
page as other warriors can see your solution. This is not a question. If you want to see others' solution you can go to this section or simply head to aSolution
button in between theDetails
andForks
button.Loading more items...