Hacker News new | ask | show | jobs
by as9as87df 3781 days ago
If you timeout on a significant number of questions, the code you wrote is not a few micro optimizations away from succeeding. The entire point is not to write the easy slow solution that is hundreds of thousands of times slower for large input sizes. This is much easier than getting the best solution, and hence less credit is given. I'm sorry that the instructions were not clear.

I agree with the author on some cases; Frequently, sites like hackerrank have a specific case that causes Java Arrays.sort() to go O(n^2) and time out. Those feel dumb; there are many real life situations where quicksort is fast on average and well worth using.

As for other things that hackerrank doesn't test, I would say you should use hackerrank to screen applicants vs as an end-all-be-all.

1 comments

I find that many of the problems require 'guessing the question' rather than just an optimized solution.

The problem will be poorly defined, missing constraints, have useless test cases. Instead the 'secret' to answering many questions requires buying test cases, etc.

-----

Don't get me wrong, it's fun for some occasional practice.

I just don't see much utility in terms of solving 'real world' problems. Unless a company has a specific need for micro-optimizing their data processing.

In practical terms, it's usually better to use 3rd party tools that are battle tested, stable, well-tested, and highly optimized. The best code, is the code you don't have to write yourself.

Developers who would rather roll their own solution and rely on naive, yet, well known solutions to common CS problems may do more harm than good. Especially, in a time/resource constrained environment.