Skip to main content

Instructions


Start Your Test

There are three sections in your test:

  1. Instructions - you are here
  2. Problem Set - consists questions
  3. Feedback - to be completed after the assessment

You can solve the questions in any order you prefer.


Timed Test

The actual assessment is going to be timed, so be mindful of it on the test date. However, the demo test can be viewed anytime you want before the test date. An ”Estimated Time” section has been added in each problem to provide an estimate of time required for completing the problem. Note that this is an average time provided as a demo-course alternative for timed exams.


Writing Your Code

We recommend that you use your preferred IDE on your local machine to solve the questions. Use the sample input provided in the problem description to test your code and also try to identify more hidden test cases. Once you are satisfied with your solution, you can test it out on the online platform. On the platform, for an individual problem, the UI would look like the following:

You must select the language in which you are coding your solution from the dropdown provided in the top-right corner. The online platform supports Java, Python, and C++. If the language is not selected, running or submitting the code won’t proceed. Once the language is selected, you can “Run Code” on the online platform to test against the sample input and “Submit” once you are sure you are done with the question.

For Java Users Only:

  • Your public class should be named Driver and there should be a space between class name and curly brace. Your driver class should have a main method only. You should never create an object of this driver class. You may get a class not found error on our online portal if you don’t follow this convention.
  • When you are running your code on our system, make sure there is no Package declaration on the top of the file. Netbeans adds this line automatically. Having that line can cause some execution errors.

You will only get the response from sample input by running the code using the Run Code button on our system. This sample input is not exactly the same as the secret input that we will be using to test your code. If you correctly solve the problem for sample input it doesn’t mean it will run correctly on the secret input as well. So make sure you cater all the corner cases before submitting the code.

Compiling Your Code

If you are not familiar with terminal, use the following commands to compile and run your code. Navigate to project folder:

cd <path_to_project_folder>

Java

                javac Solution.java // this will create a .class file
                java Solution input.in // this will run your program

                // Using third-party lib
                javac -cp json-simple-1.1.1.jar Solution.java
                java -cp json-simple-1.1.1.jar:. Solution

                // Note the : and . in the above command
                // put the .jar file in the same directory as your source.
            

Python

                python3 solution.py input.in
            

C++

                g++ solution.cpp // this will create a a.out file
                ./a.out input.in // this will run your program
            

Input will always be read from the file. There is no convention of the file name. Your program should read the input file name as the first command line argument as mentioned in the commands earlier.

Note: If your program is unable to read the input file name from the command line argument and uses a hard coded filename, your submission will be marked as incorrect and won’t be considered for marking.

Understanding the Grader Results

To execute your code successfully and return the expected output, it is essential that you provide the expected input(s) to your program and print the output value(s) in the exact expected format. Note: Our online grader checks matches each character in your output with the expected output, so you should follow the exact format provided in the sample output section of the problem. In the example below, the grader found only one of the test cases to be true when executed against the code. Correct output is highlighted in green and incorrect output is highlighted in red.


The timeout can happen for an individual test case or multiple test cases based on the implementation. In case of timeout, the following error will be shown:

If your code runs into an issue during the execution, like syntax error, the grader will flag it and display it as the following:

Submitting Your Code

You can “Run Code” multiple times on the online platform to check your output against test cases but can submit code only once for each problem in the problem set. We recommend running the code on the system as few times as possible. Once you hit the “Submit your Response” button an alert will pop up as a warning. Pressing “OK” will submit your code to our system. Note that this will only submit the current problem you are working on. You will have to submit each problem solution individually.

Once submitted, the UI will change to show your submitted code and the result of sample input:

Ending Your Test

Once you are satisfied with your solutions and you have completed the whole “Problem Set” section, navigate to “Feedback” and leave your feedback about the test. Once the feedback form is completed, you can log out, otherwise the test would end when the time is up!