• Custom User Avatar

    duplicate issue (see below)

  • Custom User Avatar

    @eb110 I actually agree with you. It should be explained (or at least displayed in sample tests) that:

    • The input must be trimmed
    • The character range is 0-9 for digits between 0-9, and A-J for digits between 10-19
    • The function is case insensitive
    • If the beginning of the string is convertable, you convert that and ignore whatever is left
  • Custom User Avatar

    Explaining why 'K' is invalid and '4jzaaa' is valid??

  • Custom User Avatar

    What would be a better wording, if you would propose one? ^^

  • Custom User Avatar

    If a character is not within the valid range to generate its base-20 representation, then it is considered invalid, so should return -1

  • Custom User Avatar

    For a 7-kyu kata, simple 'If it cannot be done, return -1.' is too ambigous to be treated as valid description. 81% of rating score confirms that.

  • Custom User Avatar

    It looks like you were working hard :-) First thing first - the author of the kata is from Poland and this is why i have included the comment in the same language. The content is rather thrivial - simple -> 'As usually you have given interesting task to solve'. Regards your research - '£' does not exist in polish alphabet, but you can treat it as polish 'Ł' as both looks similar.

  • Custom User Avatar

    I have tested these keys without success to decrypt your message: agedyropulik politykarenu regulaminowy kaceminutowy koniecmatury arewybuhoki bawoletykiju

    Should your message contain the Pound-Sign?

    Let's assume the language is English and the alphabet consists of 18 ( = 26 (a, b, ..., z) - 8 (=p r o b l e m t) ) unknown characters. This results in 1.5e12 ( =Binomial(18*18, 6) ) keys. Then around 1.0e13 (=7*1.5e12) words would have to be checked to see whether they are valid English words. Rather difficult, isn't it?

  • Custom User Avatar

    The best way! I keep forgetting that I don't need to explicity write true and false because the comparison operator always does that automatically for me.

  • Custom User Avatar

    The upper bound is not inclusive, so.... The 2nd change must take place to match the description.

    https://stackoverflow.com/questions/5063269/c-sharp-random-next-never-returns-the-upper-bound

  • Custom User Avatar

    Random tests are fine - were made upon specific measurement. Not going to change it according to your suggestion.

  • Custom User Avatar

    Removed System.Linq - btw, this is arbitrary decission but don't want to waste time for argue. The range for random test is correct - not gonna change it.

  • Custom User Avatar

    Random tests should be generated as such: (use 51, 21 and 11 as the upper bound since Python's randint upper bound is inclusive whilst C# is exclusive)

    n,m,s=randint(1,50),randint(1,50),[randint(1,20),randint(1,10),randint(1,10),randint(1,20)]
    
  • Custom User Avatar
    • using System should be in initial solution setup to ease debugging

    • should be

    int now = rnd.Next(0, 24);
    int start = rnd.Next(0, 24);
    int end = (start + rnd.Next(1, 24)) % 24;
    
  • Custom User Avatar
    • using System.Linq; should be removed from initial solution setup

    • should be int l = rnd.Next(2, 51);

  • Loading more items...