Ad
  • Custom User Avatar

    (for the record, this discussion had a follow up on Discord)

  • Custom User Avatar

    You could have asked a question on the dashboard regarding performance requirements and legit strategies to solving this problem. Also, those other kata's that DO require us to exploit language features are 6-5 kyu. Did you really think a 1 kyu kata has an expected solution with a simple one line exploit as you pulled off?

    I was only able to pass half of the 1024 bit tests in time. I was pretty tired and frustrated, I figured it's unlikely I missed some big optimization with the current approach, and figured the solution needs to be entirely different.

  • Custom User Avatar

    (preemptive disclaimer: I cannot see the two top comments because they are hidden as spoilers)

    Ad "Some katas are literally about finding ways to break expectations of the language, I had no way of knowing this wasn't one of them, instead had false clues pointing to the fact that it might be." : kata which are literally about breaking expectations of the language are not tagged as mathematics and performance. I am not sure what could be the clues pointing in this direction, but whatever they are, they should be removed or made look less clue-like.

    I admit that the line between "breaking expectations of the language" and "unacceptable cheating" can be sometimes blurry, but usually is drawn at the point where solution attempts to directly affect tests: override functions of the testing framework, fool assertions, prevent or impact execution of tests. I am not exactly sure how "find four numbers" would call for such means, but maybe I am missing something :)

    The honor/score associated with the kata has been lost because this is how system works when a solution is flagged as a cheat solution. When a moderator marks a solution as a "universal cheat", the solution is hidden (to not spread), and the reward is withdrawn with a small penalty.

    Ad "most solutions are just a copy of someone else's code, some verbatim (but that's not considered cheating?)" : plagiarism is considered unfair, and is also handled. Copied solutions are usually handled in a similar way as universal cheats, except of hiding: users who submitted them have their reward retracted. Regular users have no way of knowing if a solution they see has been penalized or not, but I in case of this specific kata, I would be surprised if they were not. You can also report dishonest users on #contact-mods channel of Codewars Discord.

    Additionally, keep in mind that when stuck, you can always ask for help in the #help-solve channel of Codewars Discord. Users there are always willing to help, and I am pretty sure that many users who solved this kata struggled with it for much, much longer than a day :)

  • Custom User Avatar

    Please, do not use such approaches, this is considered cheating on Codewars.

  • Custom User Avatar
  • Custom User Avatar

    thinking that comp was about calculating the nth number in u

    Description says:
    "Given n (integer > 2) write the function comp(n) returning the number of times where a term of u is less than its predecessor up to and including u[n]."

  • Custom User Avatar
  • Custom User Avatar

    Godo catch. Thanks for that.

  • Custom User Avatar

    Correct you are.

    The solution cannot be removed, but it would be wise for the author to expand the test cases to invalidate it.

  • Custom User Avatar

    You are doing it wrong :(

  • Custom User Avatar

    Description says:

    ... levels can be only numbers: 0,1,2,3 buttons can be strings: '0','1','2','3' possible return values are numbers: -3,-2,-1,0,1,2,3

    ... So for example goto(2,'4') must return 0, because there is no button '4' in the elevator. goto(4,'0') must return 0, because there is no level 4