Ad
  • Custom User Avatar

    I would add more descriptive test cases result messages. I lost 20min not understanding the 4.5 case, test result description 'should return -1' I just didn't know what was the problem, wrong input should return empty array as it is written in the kata task. Message should tell me the test case and valid solution imho. for example 'Wrong result, 4.5 should return: []' instead of plain 'should return -1'. In JS there is only 'number' type not int or float. Had to add this specific check.

  • Custom User Avatar

    YI have spent a night thinking of it and you are totally right, I'll check if there is a way to implement TS type checking in tests. I'll start with translating other katas to TS and then redo this one, thank you. Ommiting types with any shouldn't be allowed.

  • Custom User Avatar

    Thnak you for feedack. Making a collection of creating Nodes, LinkedList and adding more methods/functionality to it would be a bad idea?

  • Custom User Avatar

    I was thinking about the same solution, but on every iteration you calculate calcValue(max). So I left the idea behind. althou I was thinking about passing object with { bestWord, bestScore }, but yea.. it think it would complicate readabilty.

  • Custom User Avatar

    Thanks, haven't thought about that.

  • Custom User Avatar

    Realy nice kata. Enjoyed it and learned someting about my programing language of choice. From both kata and solutions. Recomend to get to know ord() and chr().