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.
Sample Tests cannot be compiled as they are. Plus there is a test for number of petals = 0, when the problem clearly states that we should expect the number to always be positive. And, this test case complete changes how the problem is solved.
The test provided is not in a format that can be used to be tested. Check out how other katas do it!
The example is not showinh in the description.
The description of the problem doesn't state that the letter is lowercase and most solutions don't consider the case where the letter is uppercase. You should update the description of the problem or add test for that case ;)
The examples should involve exchanges of more than 2 digits. It's hard to fully understand the problem with those examples. There where several cases I was not fully grasping while working with small numbers that were easily spotted with a 5 numbers exchange.
The examples should involve exchanges of more than 2 digits. It's hard to fully understand the problem with those examples. There where several cases I was not fully grasping while working with small numbers that were easily spotted with a 5 numbers exchange.
Java!
But the errors that appear were something similar to what someone else state in another comment (expected: 1.23192617954188E16 but was: 1.2319261795418804E16), which are probably related with approximations rather than code.
There is a test case where n is smaller than signature.length. I think that is the error you are getting.
The tests are kind of random. Sometimes they fail, other pass, with the same code :/
I guess it has something to do with double long numbers.