In this article
Best Practices for Coding Challenges
- Each test should have at least two coding questions: a straightforward question and one advanced question.
- Simple question: 80% of candidates should be able to solve this question.
- Advanced question: only 20% of candidates should be able to solve this question.
- A test should take between 60 and 90 minutes for a candidate to complete.
- You should include at least two sample test cases in the problem description along with an explanation to help candidates understand the format as well as the problem.
- Problem statements should clearly state if the candidate is expected to write full code or only fill out the stub. Use code stub programming questions as much as possible.
- If you refer to a variable in the problem statement as "N," then it is best to use the same notation in the code stubs. For example, it is best not to use "N" in the description and "n" in the code stub (or vice versa).
- All variable names, constants, etc., should be italicized when referred to in problem statements.
- Before sending your test to a candidate, ask a fellow employee to take it first to ensure it is easy to understand and error-free.
- Be mindful of the problem statement. It should be clear and include written examples of inputs and outputs.
- Make the experience worth the candidate's time: high scores should faster move the hiring process.
- Not every candidate will take your challenge. However, the ones that do are far more qualified than before.
- Test cases form the basis for your evaluation of a candidate's code.
- The total score given to a candidate is the sum of the scores of all test cases that pass.
- There should be at least three test cases per question (sample, easy, edge).
- To the extent possible, ensure that no two test cases have the same output or return value.
- Create challenging test cases at a difficulty level. Not every candidate will pass.
- You should have at least 2 test cases marked as Sample Testcases, and ensure they are the same as the ones you have explained in the problem description.
Remember: Be Creative
- Take the time to make your challenges as compelling as possible.
- Challenges related to your industry or brand average better click-through and completion rates than generic versions.
- Do not be afraid to reach for new ideas:
- "How much fuel does the rocket ship need to reach mars?"
- "James Bond must decrypt code to save the world..."
- "A city is planning a new rail line. Determine the route that maximizes most residents served in the fewest stops."