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.
This comment is hidden because it contains spoiler information about the solution
I fixed that, thanks!
When a rabbit jumps for 6 cells he has no idea where the wall is, it is NOT MATTER, the matter is he jumps 6 cells. If there wasn't a wall he should land on 6th cell, but in your example he would land on 5th.
This comment is hidden because it contains spoiler information about the solution
I think some people are still confused by the ASCII jumping ;)
It might help to show the edge case where the rabbit is at the far fence: e.g. [3,1,0,0],0 and [4,1,0,0],0 both have the rabbit jump and land on the end position of the field. In the first case the rabbit faces right and will bounce back onto the final bean; in the second one, the rabbit faces left and misses it.
that doesn't change anything
added
Oh, on my part I was just slow xD, I didnt abstract the examples and thought that the jump height matters for some reason :P thank you!
:thumb_up:
hey! the height of the jump doesn't really matter
I just have bad ASKII art skills :D sry.
Main thing is the position change - I just dunno how to draw it correctly.
How does the jump work if the jumppower is an odd number? does it go up by (n/2)+1 and go down by (n/2) or vice versa?
Missing fixed test (for people who forget to register the first position in some very exceptional cases...)
.
What determines how long the peak at the top of the jump is?
In the example where the jump power is 2, the peak was a single underscore _
In the example where the jump power is 6, the peak was two underscores __
How do I calculate how many underscores there will be in a jump?
Read this: https://docs.codewars.com/training/troubleshooting#post-discourse And don't create kata issues (that's a problem in the kata itself) when the problem is in your code.
If you want to use a label, use
Question
. About your problem:Your code is returning
True
for that input, do you agree that the result should beFalse
instead right? Your code isn't catching that and the last line returnsTrue
.Loading more items...