I went through one of these hackerrank puzzles last night and even submitted one solution in Clojure for fun that’s pretty idiomatic. It gave me a score of 10/60 because most tests with huge numbers (in the hundreds of millions of n!) would time out. Then I looked at other people’s solutions that have 60/60 scores and they all consist of low level perf optimizations around loop/recur, unchecked math, type hints, etc. It seems like the site turns into “most clever perf optimization competition”. Since there are so many ways to write a solution to a problem, the only easy way for them to automatically “give a grade” to a solution is based on performance. I totally have done the perf tricks showed there when needed but they are not required in 98% of the code that I usually write.
@raspasov Yeah, that sort of thing is why I consider these sites completely inappropriate for hiring purposes.