Yep this seems right; HackerRank is closer to TopCoder, the goal is to pass the test and whatever other criteria there is. For HackerRank it's to pass the test and prove you can code to the interviewers. For TopCoder it's to pass the test and make the code as performant as possible.
I'm hoping that no one is really using either of those as a model for production code though!
I'm afraid people are taking those exercise starting points as models for how they should code because they don't know to be critical of them. Hope this post can reach at least a few of them.
Thanks for reading, Rudolf.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.