Ad
  • Custom User Avatar

    There is no "unretirement". You can create another kata with the problems fixed and give it a try.

  • Custom User Avatar

    If you mean the uppercase "Just" in sample tests, it's already fixed! 🙂 I'm not sure it'll help me "unretire" it, though 😔

  • Custom User Avatar

    It's the first line in the interpret method. variables = new HashMap<>();

    What you're not saying is that you put a STATIC in front of it. And that's where your global state is. That hashmap is common to every single call done to your method (common as in "created once only, used by each call in its current state").

  • Custom User Avatar

    Here having the same issue. Where did you put "new HashMap<>()"?, in the beggining of the interpret method?

  • Custom User Avatar

    Whatever this kata improves, it was much mor fun to solve it, than boring "code all day to get an one digit answer" katas.
    I really glad that this kata exists, it's just fresh air and why I prefer Codewars to Leetcode and other.

  • Custom User Avatar

    same problem, that's the only test that I couldn't pass

  • Custom User Avatar

    An integer array of length "0" should work. It is probably best practice to creat an appropriately sized integer array to begin with, rather than returning the integer array upon receiving an empty input array.

  • Custom User Avatar

    It sounds more like a problem with your solution which seems to mutate some state in a way the function does not work correctly when invoked again.

  • Custom User Avatar

    IT means that tests expect a single space between two E's, but there's no space in the answer returned by your solution.

  • Custom User Avatar
    1. If a "math formula" saves you 100s of lines of code, don't you think that it makes you a better programmer to know how to use such formulae? Or do you say "No mathematics thanks - I want to do things as inefficiently as possible" ?

    2. This is more about logic/reasoning than advanced "mathematics" really; and practice with these kinds of puzzles makes you improve over the long term even if you don't notice immediately your "coding skills" being tested.

    3. The person who created this kata is ranked #2 on Codewars with over 5,000 completed katas in 12 different languages - he presumably has a decent idea of how to "improve coding skills"; do you think you have more experience than him to have a better opinion?

    4. You can always skip the katas you don't like.