4 kyu

Guess the Text

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • monadius Avatar

    CoffeeScript: the range of random characters is 0 <= char code <= 1024 (but the description has 1023 as the upper bound).

    CoffeeScript uses randint to generate random characters and randint includes the upper bound.

  • Blind4Basics Avatar

    now that we'are at it...

    • the solution setup shouldn't use var (neither the tests, but I don't see them, so...)
    • can you add the expected string in it(`"${...}"`,... messages?
    • dfhwze Avatar
      • for the "huge" strings, also the entire string in it? Maybe use "it" for all of the smaller test cases, but still group the larger ones in one "it" for the entire batch ...
      • var removed from code everywhere
    • Blind4Basics Avatar

      no, just for small tests.

      Also, missing sample test: something generating this in my faulty solution:

      ...
      ȇϿ 1023 1023 1024
      ȇϿϿ 1023 1023 1024
      ȇϿϿϿ 1023 1023 1024
      ȇϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      ȇϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿ 1023 1023 1024
      
    • dfhwze Avatar
      • That should be fixed, 1024 was included in random test generator, but is no longer the case.
      • specific IT blocks added (with expected string) for small test cases with printable chars (narrow tests)
    • dfhwze Avatar

      If more tweaks are required, we'll make another issue for those.

      Issue marked resolved by dfhwze 16 months ago
  • Blind4Basics Avatar

    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

  • dfhwze Avatar

    Should we increase the unicode range of characters to make this more challenging?

  • Voile Avatar

    This comment has been hidden.

  • user9644768 Avatar

    This comment has been hidden.

  • CIS 122 Avatar

    This comment has been hidden.

  • Abbe Avatar

    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. :-)

    • DonaldKronos Avatar

      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. :)

    • Abbe Avatar

      This comment has been hidden.

    • DonaldKronos Avatar

      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. :)

  • MMMAAANNN Avatar

    This comment has been hidden.