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.
Basic tests pass, but random tests give me an error: java.lang.reflect.InvocationTargetException
What could cause the problem?
One more tower)
easy
Fell for that as well.. refactoring..
I was solved by checking nFloors by zero.
Nice, it's easy but it take from me a 95 min because i didn't understand the probleme in the first time.
This comment is hidden because it contains spoiler information about the solution
i'm having the same problem now...
simplified version of the Diamond exercise, if you've come across that before
try this:
I managed to create the algorithm, however, it was very extensive. I passed the test, but I was not satisfied.
But this solution does not account for negative values... 🤔
if its 0, it will just return the number (0) just like if it was negative so theres no need to test for it
You can literally see the spaces in the examples in the description.
The description should have some mention of the spaces around the asterisks for each floor. While it can be inferred that there needs to be spaces to actually make it look like pyramid, if it's not mentioned in the description then it can easily be overlooked. I managed to solve this one, but I was extremely confused by why my code wasn't passing originally when each floor had the correct amount of asterisks. The description describes what a floor looks like with no spaces, implying that each floor should only have asterisks. It's not until after you check the test cases that you can notice it needs spaces. At least not for newer and learning programmers.
Loading more items...