You can create approximate algorithm problems. The solutions to these problems tend to find approximate solutions to optimization problems. These questions are particularly useful for domains of software development where there is no single correct answer, such as image processing or computer vision.
You can create a custom checker to score these questions because these questions have more than one acceptable answer. For example List of 5 prime numbers less than 100. There are 25 prime numbers less than 100. So, candidates can list any combination of 5 prime numbers from the list of 25 prime numbers and they will all be correct answers. In the custom checker, you can also choose to give a partial score to a candidate who lists 3 prime and 2 composite numbers. The candidate, in this case, will receive 3 points for the question if the total score for this question is 5 points.
Therefore, unlike the binary pass and fail strategy that works well for coding questions, a custom checker can use the logic you determine and give partial credit to make more optimum scoring decisions.
- You must be logged in to your HackerRank for Work account.
- Click the Library tab on the home page and then click Create Question.
- In the Select Question Type dialog box, click Approximate Solution.
- Follow steps 3 through 6 of the Create a coding question topic.
- In the Custom Checker page, write a custom checker code in the editor.
A custom checker is a piece of code written by the problem setter to evaluate test case results and provide custom scoring logic.
Refer the Creating a custom checker topic to understand more details about custom checker.
Defining the Custom Checker
- Click Save Question to save the question and exit. Alternatively, click Save & Add another to save this question and add another question.
The Questions you create are stored in the HackerRank Library under the “My Company questions” section. The Question type and the associated tags are indicated below every Question title. While in the Library, you can proceed to create more questions or add Questions to your Tests.