Ad
  • Custom User Avatar

    Clearly the definition of anagram already covers this aspect, so closing...

  • Default User Avatar
  • Custom User Avatar

    Fair enough. Done.

  • Custom User Avatar

    handled, and added the threshold thing, to get better feedback in the assertion messages.

    sorry for the troubles

  • Default User Avatar

    Suggestion:

    Instructions do not explain what the function is expected to return.

    I think it is important to explain that in detail (specially considering that this is a 7 kyu kata).

    For example:

    Your function will receive 2 strings: "a" & "b".
    
    Return -1 if "a" must be sorted before "b".
    
    Return  1 if "b" must be sorted before "a".
    
    
  • Default User Avatar

    TypeScript version fails to compile (missing export).

    Reported here: https://www.codewars.com/kata/57dd3a06eb0537b899000a64/discuss/typescript#63ac76683f04b10031696cc6

    Hope that can be solved. For some people it can be a trivial thing.
    For many others (specially considering that this is a 7kyu), it can be non trivial and prevent them from solving the real challenge.

  • Default User Avatar

    Bug in TypeScript version:

    • Initial code in the TypeScript version fails to compile (export missing).

    IS:

    const comparator = function (a: string, b: string): number {
      // Your code here
      return 0;
    };
    
    

    SHOULD BE:

    export const comparator = function (a: string, b: string): number {
      // Your code here
      return 0;
    };
    
    
  • Default User Avatar

    updated description

  • Default User Avatar

    If a comment can be pinned, this one is obviously a must. I've completed hundreds of Katas but never imported a library. So this 7 Kyu kata really caught me off guard. I honestly thought you have to implement your own MD5 algorithm in a 7 Kyu kata.

  • Custom User Avatar
  • Default User Avatar

    I believe instructions (or sample tests) should be much more explicit with the requirements.

    Some examples:

    isBalanced("(Sensei) says [something]", "()[]") // can a pair be closed before the second one ?
    isBalanced("(Sensei) -says- [something]", "()--[]") // can expect more than two pairs ?
    isBalanced("(Sensei says something)", "()ss") // can the pairs be any charachter? -is it safe to filter letters from the initial string? 
    
  • Default User Avatar

    (JavaScript)

    Important improvement:

    This is a 7kyu kata and, oviously, warriors are not supposed to implement MD5 algorithm themselves.

    But, unless you've done the previous kata in the collection, it is not really obvious that you can import external modules -I've solved 40 katas on Codewars and it is the first time I see it (TBH I didn't even consider that was possible).

    Suggestion:

    Add this text at the beginning...

    Before you do this kata, it is recommended that you solve the first kata in this series: Node.js Intro

    ... and include the following tip:

    Tip:
    Remember that you can include the builtin require function to include external modules (you're not expected to implement MD5 hash algorithm yourself, there are many modules that can do that for you).

  • Default User Avatar

    *** Fix for this bug ***

    In the Kata Test Cases, inside the function lastDayIsFridayCheck(), there's the following three lines:

      inicialDate.setYear(initialYear);
      inicialDate.setMonth(1);
      inicialDate.setDate(1);
    

    .setMonth() expects a zero-based integer (ie. 0 for January)

    The following will fix the problem:

      inicialDate.setMonth(0);
    
    
  • Default User Avatar

    The random tests are wrong.

    For example:

    Not the correct number of Fridays between 2014 and 2014 - Expected: 2, instead got: 3

    ... but year 2014 clearly had 3 months ending in Friday.

  • Default User Avatar

    It'd be good to add examples in the instructions (they'll look very verbose but helpful anyway).

  • Loading more items...