Question quality is important for making HackerRank tests more effective. The Quality Review page helps you to analyze the Coding Question based on the following 4 parameters:
- The overall number of test cases included
- The number of ‘Sample test cases’ added
- Whether the question uses auto-generated code stubs
- Whether the question has descriptive tags
You should aim to meet all 'high-quality' conditions on your Questions before using them in HackerRank tests and interviews.
You can view the question quality under the Quality Review tab which displays while creating and editing coding Questions. After you have added the problem statement, test cases, and code stubs to a Question, the last step involves reviewing the question quality and making any recommended changes to improve the question.
You must have a HackerRank for Work account.
- From the HackerRank Library or from the Questions tab of a Test, click Create Question to create a new Question. Alternatively, from the Library, select your Question to edit and review quality.
- In the relevant Question tabs, define the problem statement, score, programming languages, code-stubs, and test cases.
- Proceed to the last step in the Quality Review tab.
This page automatically generates and displays a quality review for your Question based on whether your Question includes the recommended number of sample and hidden test cases, auto-generated code-stubs.
You can follow the recommendations provided on the Quality Review page to improve your Question quality.
The following sections in this article also guide you through the best practices and recommendations to be followed while creating your Questions in HackerRank for Work.
Understanding the Question Quality Parameters
Adding Test cases ensures that a coding question is automatically evaluated. Without any test cases, a question will not be scored and might defeat the purpose of an assessment. Therefore, it is recommended that you add at least 3-4 sample test cases of which 1-3 are present in the statement, and an overall 3-15 test cases of easy, medium, and hard difficulty levels to each Question.
Sample test cases improve question comprehension. It allows your candidates to quickly understand the Question and the expected output from their solution. This improves their likelihood of attempting the Question and adds to their positive test experience. It is recommended that you include at least 2 or more sample test cases in your Question.
Whether the question uses auto-generated code stubs
Using HackerRank’s auto-generated code stubs (or boilerplate code) is the best practice. Code stubs are recommended because they help your candidates to directly read input and write output using STDIN and STDOUT respectively. This also helps prevent situations where a candidate writes the right code but fails to display the output correctly using STDOUT.
However, you may NOT be able to use HackerRank’s auto-generated code stubs in specific scenarios. For example, HackerRank does not provide auto-generated stubs for:
- reading in a binary tree or
- returning a class object from a function
You may also choose not to use the auto-generated code stubs in scenarios where you want the candidates to display their output in your desired format and perhaps, you want to assess them on their ability to deal with STDIN and STDOUT.
In the above scenarios, you can retain the default code stubs, or you can choose to write your own code stubs (user-modified code stubs) for all the programming languages you want to allow in your Tests.
Note: Writing your own code stubs (user-modified code stubs) requires additional effort. However, once you write them, you can reuse them in the other Questions.
Whether the questions have Descriptive tags
According to best practices, every question needs to have at least 2 tags that describe and/or classify the question. Standard tags that need to be inserted into every question include the difficulty level: 'Easy, Medium, or Hard', skills or area of expertise the question assesses: 'Algorithms, Problem Solving, Data Structures and so on. Tags that further describe the question, such as specific concepts tested in the question, required knowledge, etc.
Ensuring that your Question follows the above-mentioned best practices and recommendations helps to create good quality questions, and when good quality questions are a part of your Tests, it adds to your candidate’s positive experience and also your Company's goal to attract and hire only the best talent.