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.
I have the same issue. How did U solve this?
My func modifies the board and this seems to persist across tests. That's pretty annoying
It should be passing all the simple tests as it is but it's failing.
This comment is hidden because it contains spoiler information about the solution
Where is the KYLAN post? Or any post describing the problem?
Thanks. Still don't get it.
I don't get it. More explantion needed
I just want help understanding the problem without any code invloved. I've tried various ways to show the blocks here so I can demo my misunderstanding, but they don't format correctly :(.
For
flip('R', [3, 2, 1, 2])
, shifting the blocks right (not in code, just in theory), I get[1, 3, 4]
, which is wrong. Any one explain where[1, 2, 2, 3]
comes from?Did U get a grasp on the problem? I'm having this issue also.
I had a logic error.
Deleted
In C++ how do I return (not print) true of false? I get back 1 when I do
return true
. This fails the tests. (More of a C++ question than a kata issue)Thanks alot everyone. I solved it. This was by far the hardest, easy challenge I've done here. The code is very simple but it took all your help and hours to really figure out what the problem was.
I think it could be better worded, but isn't that the case with all katas pretty much.
Awesome kata. Thanks again.
This comment is hidden because it contains spoiler information about the solution
Alright. Last comment and if I don't get it I'll move on. I'm not sure if this right.
In the example using
,+[-.,+]
andCodewars
. I have a tape,tape = []
.Using the
,
I accept inC
totape
. Nowtape = [67]
. I+
add one,-
subtract one, then I use.
to get the value at thedata-pointer
, which points totape
ortape[0]
since that is the only value. I'll push that to an outside list that holds the final output.str = []
thenstr.append(tape[0).
Next I accept antoher value at
,
to tape, nowtape = [67, 111]
. BUT now I add and subtract what? Thedata-pointer
is still pointed attape[0]
. There are no>
here, so all that happens here isC
keeps getting added. This can't be right but it's what I've gathered from our discussion.In this case there are only three places this cursor can be active, I think. @FArekkusu - Memory has to be somewhere though? I'm not doing this is C so I'm not mallocing.
One of these is what the cursor moves on:
code
in Python. This is the Brainfuck code. i.e.,+[-.,+]
input
in Python. This is the string that I was moving the cursor on but was failing. i.eCodewars.
.
puts the final bytes. Also maybe referred to as memory. I think. i.e. the return valuesCodewars
There is no memory unless it's one of these? Or am I missing something? So I'm guessing that #3 is where I move. If this is the case then my second questions will not be an issue. I was moving the cursor along the wrong piece of data,
input
. It doesn't say which it should move along in the description;data
could be anything IMHO.Thanks @Blind4Basics for your clariifcation!
Loading more items...