6 kyu
[BF] Memory Limited : Print Last/First Chars (Using only 3 cells)
86iNont
Loading description...
Fundamentals
Algorithms
Strings
Puzzles
Restricted
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
These memory limited BF kata are just full of absolutely unreadable answers and I find that hilarious.
Hey What WTH?? My code was working PERFECTLY* on EVERY BF interpreter I could find on the web (* including every specific case i.e. "A" --> "A" "Hello"--> "oH" "strings" --> "s") and and didn't contain more than 52 characters... But here for some reason, it keeps "timing out"!? (but executes perfectly fine on every bf interpreter, with instant result) ...This is very frustrating :/
This comment has been hidden.
Dunno if you still care, but your code is timing out on single character inputs. For whatever reason, on codewars inputs default to 255. So for an input of a\0 you start with [97] [0] [255] and your code just keeps copying cell 3 to cell 2 cause it never hits the EOF marker.
Constantly getting an error assigninga server. Is this a problem on my side (though everyong stopped working after rewriting my wrong but working code and coming back to it) or site/server side?
working correctly on my side.
You do realize that's a paradoxical statement, right?
I mean it was doing the wrong thing, but at least the program executed. Later I had to wait for 30+ sec just to execute
,.
.If the connection to CW is bad then it might take a long time before the code is run. But otherwise after the code is run it got (usually)
12
seconds to run before timing out.Approved ;-)
150 chars? That's a lot, considering how you can do that. Maybe you could reduce it to 75? (that's the exact length of yours, currently (with extra spaces). I did it in 51)
Thank you for your suggestion :D I have reduced it to 75 as you suggested.
Actually, I added the code length limitation just to avoid hard coding in some way.
51
is too long,46
is better ;-)Agree to 46.