4 kyu
Guess the Text
Loading description...
Algorithms
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.
CoffeeScript: the range of random characters is
0 <= char code <= 1024
(but the description has1023
as the upper bound).CoffeeScript uses
randint
to generate random characters andrandint
includes the upper bound.fixed
now that we'are at it...
var
(neither the tests, but I don't see them, so...)it(`"${...}"`,...
messages?var
removed from code everywhereno, just for small tests.
Also, missing sample test: something generating this in my faulty solution:
If more tweaks are required, we'll make another issue for those.
Either the perf constraint is too high, or there are missing fixed tests: I cannot do anything else than poke in the dark, right now, because I time out in the "wide range small random tests", and I cannot print stuff to the console because of the random batch just before that is generating huge strings
Once back up, I'll rearrange to have all batches with smaller strings before other tests.
I think it's still possible to push the changes, right?
ah yeah perhaps so, lemme check. Also, the ref solution and intended solutions pass in 1 - 3 seconds
so I guess I have an infinite loop somewhere...
I updated the test order.
.
Should we increase the unicode range of characters to make this more challenging?
Since author is no longer active, I'm taking the liberty to adding performance constraints within the current range of ASCII values.
description and test cases adapted
oops... x/
ah well it's reported, so we'll see what happens
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
fixed
This comment has been hidden.
fixed
I really look forward to doing this when I have the time. Meanwhile, I'll just mention that you misspelled your own name in the description. :-)
LOL! Yes, I did at that. Typo. Corrected now. Nice catch. :)
This kata wasn't meant to be easy. I hope you enjoy the challenge and up-vote it. :)
This comment has been hidden.
I love your JavaScript solution. It's actually quite a bit like the c# one I had made, which was rather unfortunately lost, but I lie yours better, although my c# one did have an efficiency advantage the the character guessing part (Edit: I took another careful look at your JavaScript solution, and I take back what I said about my lost c# one having been more efficient. It would have been just as efficient, (except for the differences in the languages them selves) because you did it the same way I had. Without my reading glasses on I had mis-seen part, and thought you were incrementing and decrement min and max by 1. LOL! Great work.) My JavaScript and CoffeeScript solutions that I built it with are much less elegant and much less efficient. They just get the job done. :)
This comment has been hidden.
This comment has been hidden.