Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
(for the record, this discussion had a follow up on Discord)
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?
(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
andperformance
. 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 :)Please, do not use such approaches, this is considered cheating on Codewars.
Yeap))
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]."
What?
Godo catch. Thanks for that.
Correct you are.
The solution cannot be removed, but it would be wise for the author to expand the test cases to invalidate it.
You are doing it wrong :(
Description says: