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.
Isn't this a mistake in the test? assertEquals("aaaccccbbdd", Kata.hasSubpattern("abcdabcaccd")); The sorted string is "aaabbccccdd"
my face reading this be like: [^_-]
With input "abc(" it loops forever.
With input of "ab(cd", output should be "ab(cd". But with this you would get "ab". Maybe it would be useful to save last index of where you open parentheses, and in the end of loop, there could be a check if sum == 0. If not, sum += str.substring(savedIndex).
i think this might work as well:
name.replaceAll(".*\w(\w+$)", "$1");
This comment is hidden because it contains spoiler information about the solution
switch would be even more elegant ;)
Why does this work? Doesn't ".reduce((a, b) -> -1)" mean that int i will always be -1?
In the getter, if (side == 5) { side = 0; return 5;}. This is stupid, but fixes the mistake in the tests.
This generates IntStream too many times.
This comment is hidden because it contains spoiler information about the solution
A bit annoying, that I've got grouped with this...
In Java, the task seems very simple. My solution passes initial tests. But then it fails at later ones and I cannot find any way to debug. At least I could know the parameters that were passed..
pls fix:
birth:3443, yearto:3442
expected: <You will be born in 1 years.> but was: <You will be born in 1 year.>
Another one was expecting "you will be born in 0 years old"
Deep down each char is a number. Or I could cay has int value attached.
Loading more items...