Skip to content

Using HackerRank

Brian "Beej Jorgensen" Hall edited this page Sep 6, 2019 · 5 revisions

The Attempt is What Matters

These are tough problems, and a lot of you won't complete them in the time allotted. If you get the right answer, great. If not, that's fine too, as long as you made the attempt. Whether you get it right or not doesn't matter remotely as much as the time you spend trying to get the answer.

Every minute you work on a problem is 5 experience points. Getting the right answer is 0 experience points.

For the CS challenges, you don't need to pass the test. You just need to work on it.

Remember Polya's!

Remember Polya's!

Read the problem description slowly and carefully. Way more slowly and carefully than you need to. A mistake during Understanding the Problem will result in a wrong answer.

The Planning phase is equally important.

Write Comments

While in the Planning phase, write comments in the editor and then turn them into code, leaving the comments behind for posterity.

If hiring managers ask you to complete a code challenge, they will grade you partially on how well-commented your code is.

That doesn't mean "tons of comments". It means "good, concise comments in the right places".

Use Whitespace

If strategically adding a blank line makes your code more readable, do it. Good coders are able to recognize logically-connected "paragraphs" in their code and put whitespace between them to increase readability.

Get Familiar with the HackerRank UI and Process

This is a sticking point for many students. HackerRank has an interesting UI and it takes some getting used to. Their tests also have a consistent format and structure that you should explore and take the time to get familiar with.

Clone this wiki locally