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 solution doesn't work.
'Hello, world' -> 'Hello, orldway'.
Should be:
'Hello, world' -> 'elloHay, orldway'
exactly xD. But thats the beauty of this website. Learning from others.
If only you smarter fellas documented your code. THe world would be perfect. :/
I forfeited this one, but if I knew that words with punctuation inside of them don't have to work I would've wrote this.
It's not though? best practice would be to follow standards, PEP 8 clearly says 72 char lines max
alpha😈
but seriously how do i see new functions every day
I've the same solution. But it will be problem if punctuation will be inside word. We need to check words for punctuation and append them to our expression if they will be in the list. But for this kata this solution will work.
This does not seem to work if punctuations marks are used,
For example:
pig_it("Pig latin is cool!") gives: "igPay atinlay siay cool!" where this should be "igPay atinlay siay oolcay!" because punctuation marks must be left untouched.
best practice
When I tried a solution similar to this, I got a runtime error. Is Character.getNumericvalue(intString.charAt() substantially faster than Integer.parseInt(String.substring())? Or was there perhaps something else that I was missing?
This comment is hidden because it contains spoiler information about the solution
This was news to me. Thank you!
Amazing code broski!
This comment is hidden because it contains spoiler information about the solution
Easier, yes.
Simpler, no: recursion is harder to read, understand and debug.
Faster, barely: log10(n) is only slightly faster than converting to String.
Space efficient, hard no: recursion will alocate more stack space than a string.
Personaly I prefer the solution above more, as it is easier work with(all be at slower).
Loading more items...