Hiring Managers and Recruiters will learn how a programming(algorithm) type question can be added to a test.
To add programming (algorithm) type question
- Login to your WeCP account as a Recruiter/Hiring Manager.
- Navigate to the test to which you want to add the question.
Note: If the test is already not created, you must create the test before proceeding forward.
- Further, navigate to the Questions tab at the top, inside the Test dashboard.
- Expand the section of your choice and click on the Add Questions button.
- In the Question Library window that appears, click on the Create new Question in the upper right corner.
- Choose programming (algorithm) question type, in the question editor.
- Let us take an example of a simple question based on arrays and loops. So, you must fill out the details in all the following fields, to complete the question:
You must specify the basic details of the questions including title, difficulty, expected time to solve, etc as shown in the example image given below.
You can give any title of your choice to the question.
Example: If the question requires the candidate to do some kind of traversal and arithmetic operation, you may set the title as 'Playing with Elements'.
You must enter the difficulty level of your question in this field from Easy, Medium, and Difficult.
Expected time (in min. )
This field denotes the time that you think would be required to solve this particular problem.
Example: 5 minutes is the ideal time to solve a simple question of array traversing.
You can enter the name(s) of relevant skills that you think a candidate should have, to solve this particular question.
Note: The skills must be comma-separated and extra white spaces in between should be avoided.
Example: To solve an array traversing question, the skills that a candidate must possess are Array and loop.
It is advised to fill this part carefully, as it makes it easier to find questions later. You must add exactly 6 tags to each question. Learn More
Example: In an array traversing question, the tags can be: Programming(algorithm),L1,Easy,
You must specify the time complexity of the question in this field.
Example: The time complexity of an array traversing question is O(N).
Time limit (in sec. )
This depicts the maximum time limit within which the candidate code should be run and executed. If the code takes more time than this to execute, it will show TimeLimitExceed error to the candidate.
Example: The time limit of a simple array traversing question should be ideally 3 seconds.
In this field, you can write an optional brief description of the question.
Example: The brief description of a simple array traversing question can be 'Array traversal and number counting'.
You must enter the question text in this field as shown for the example question below.
By default, the candidates can solve the question in any language of their choice, given in this field.
But if you wish to restrict the candidates and allow them to use only a few specific language(s), then you must toggle the Restrict language button and only select the language(s) of your choice.
Here, in the given image, all the programming languages have been allowed.
Further, once all the testcases are uploaded and marked, you are guided to click on Validate Testcases button.
Then, click on Open report.
The following fields will be visible to you in the test cases report:
This field only displays the test case serial number.
Input file validation
This field validates that the input test case file is uploaded in the correct format i.e. .txt.
Output file validation
This field validates that the output test case file is uploaded in the correct format i.e. .txt.
Output file uniqueness
This field tells you if the output of that particular test case is similar to the output of another test case.
Note: It is recommended to have test cases with unique outputs.
The test case validation report for the example program is given below:
You must enter the solution program in this field and add the answer explanation corresponding to it.
Note: You must write the solution program separately for each of the programming languages that you have allowed the candidate to use.
The python solution for the example question along with its answer explanation is given below for a quick reference:
You can generate a code stub using this field. This will appear as the starter code to the candidates in any language that they select, as shown below.
Here, in the example program, a function named check() having an Integer data type has been added. Also, a new integer array named 'A' having size 10 is added and passed to the check() function.
Note: You can add only one function to the code stub. However, you are allowed to add as many variables as you like and they can be of any data type.
An image of the example program code stub is given below.
Function Code Stub Details
In this field, you must explain the details of the code stub/starter code given to the candidates in the previous field.
You can refer to the Function Code Stub Details of the example program given below.
- Finally, click on the Save question button to save the changes.