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.
Solved for two test cases... Got this weird error I've never seen before. Any tips?
This feels like a 5, not a 6ku
This comment is hidden because it contains spoiler information about the solution
Yes, you did, but not before using
[]
and that's why you get the error. Move that if up.Thanks for the reply @Chrono79. I reread the setup and I can't determine what to return if no winning pairs are found. I tried returning nil if winning_pairs == [], but no luck.
Use
p winning_pair
to see its value. At some point it isnil
and you try to access it with[]
Can somone explain this error code to me? Passed all standard tests, but I can't decipher what is triggering this error:
sweet! solved. thanks :)
No, draw the example as a bar chart, the first number is 7, the next one is 9 (higher than 7), the next one is 6 (lower than 9), and so on. They alternate between higher and lower. So for a given element, except for the ones at each end, the numbers immediatly before and after are both higher or lower than the number itself.
The definition of bouncy is not making sense to me. Can someone articulate it differently and see if it clicks. I can't see the rule that's determining the subarrays. Here is the closest I can get at what the definition means:
FOR A GIVEN ELEMENT:
# it MUST be HIGHER than one neighbor AND lower than another neighbor
please help.
setup should specify whether frog can jump out of either side of the array or not.
The way the tests are written for this kata make it hard to debug.
the universe has a way of balancing things out
Why is this a 5? I've done way harder 6s
I hate this kata, but was a good practice
Loading more items...