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.
.
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.
"Once one knows the language" Thats the entire reason why i do these. First I solve them just making it work (Python), and then i look at the solutions of the pros and feel like an idiot, but it gives me real world exapmles of how to actually use the conventions of the language versus trying to do everything the way id have done it in another language. And I dont have to try and create code for a useless program and not have any idea if I could have done it more efficiently. Idk if that makes sense.
There are special
Function
andStream
implementations forint
:Stream<Integer>
-->IntStream
Function<Integer, Integer>
-->IntUnaryOperator
Predicate<Integer>
-->IntPredicate
The assertion message should specify exactly which year failed the test and not a general "Your function gave a wrong result on one of the inputs." So do the assertion directly where you check the solution for a single input and not
assertTrue(allMatch()
.dude thanks! it relieves
Hey,
Don't let just one kata discourage you. I've been programming professionally for six years and would find this Kata difficult. Not sure what type of programming you do but these kind of challenges aren't reflective of most day-to-day programming that most people do :)