top of page
Herman Autore

Reaching first place on HackerRank

As part of my preparation for a data science interview I am practicing my SQL skills. Back in 2020 I joined HackerRank, a website for practicing and competing in programming problems, and did a few challenges in the Problem Solving track. When I was contacted by a recruiter a few weeks ago for a very exciting interview opportunity I decided to use HackerRank again, and this time try to reach a meaningful milestone, like completing an entire course of challenges.

Because of my experience at my most recent position, I had become quite skilled at writing basic SQL queries, and the first few dozen challenges were completed with no problem at all. Then the struggle began. I noticed that I would submit solutions and they would be marked wrong, and I couldn't find anything wrong with my code. Then I would go over the example problem and solution and noticed that what they were expecting, based on the example, is different than what they implied in the problem statement. After reading some posts on Reddit I was comforted to know that I was not the only one experiencing this problem. Indeed, the challenge prompts for the SQL track on HackerRank are poorly written.


Regardless, the experience was rewarding. As vain or shallow as it might sound, I felt really great when I saw that five-star gold badge show up on my dashboard. But then again, that's what "these baubles" are for. Cheered on by my medals, ribbons, and stars, visual representations of my progress, I went on the finish all 58 SQL challenges on HackerRank and I learned a few things along the way, like how to use aggregate filters using HAVING and transposing tables by using PIVOT.


Another practical reason for participating in these coding "grinds", or sprints of challenges one submits one's self for the purpose of gaining some quick comprehension in a domain, is that it makes you stand out from the wider pool of skilled candidates. True to its name, HackerRank keeps track of your rank among the number of members, or hackers as they are called on the site. When I completed the second to last SQL challenge my rank was 33,134, and when I finished all 58 of them my rank went to 1st place. This implies that the ranking is based on completing the problems and not any form of partial score.


Using this information we can estimate the percentile of a member by their rank. When I completed all 58 of the SQL challenges I became part of a group of 33,133 from the broader population of SQL challenge participants. Online sources say that HackerRank's membership ranges from 7 to 26 million members. If we assume that all of its members participate in the SQL challenge, then the percentile calculation becomes

33,133 / 7,000,000 = 0.4733%

or half a percent.


After this experience I've decided to not use HackerRank anymore because of the aforementioned lack of clarity in the instructions. I will however start using LeetCode, which is supposed to be better.

7 views0 comments

Recent Posts

See All

Changing directories across drives (Windows)

Normally on the command line you can change directories by simply invoking the `cd ` command. However, if the directory you want to go to...

Comments


bottom of page