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.
Here is a version that works with my tests :
Code is as follows: https://www.codewars.com/kata/reviews/55472965761db2bab8000085/groups/623b5f73dff0240001526f40.
Tell me what you think.
Apparently in java8, ArrayList.addAll(null) returns stackoverflow !!
At some point one of the sqInRect will return null so the whole will fail
Hello. To make kata more intersting (and rank up to 6 kyu), I suggest adding a note to solve it using only date & time manipulation methods natively available in the language.
Hello HerrMeyer.
Good solution using mainly regex methods.
I've tested and pattern should be changed to be case incensitive. Otherwise following test will fail: assertEquals("C2d4w6rs 10s th15 b18st s23t25 27n th32 w35rld", Kata.vowel2Index("Codewars is the best site in the wOrld"));
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Correct me if I am wrong: the String.split will find the pattern, remove it and keep left and right side.
So every 2 chars, split will remove pattern, keep left side (just got removed) and right side.
The trick here is that thanks to the capturing groups (?<=) + \G, pattern is reinserted(?) or pattern becomes "what's in between 2 chars" (?).
Still trying to figure it out.