Instructions - FAQ's - Onsite Coding Test
Instructions - FAQ's - Onsite Coding Test
FAQs
Q. How many questions/tasks will the test consist of and how long will I have to solve them?
A. You will have to complete 4 programming tasks in 7 hours. Once the test begins the 7 hour window will
begin as well. This time duration will be inclusive of the lunch break as well.
If you find something difficult in one language, you can solve that problem in a different language as well.
Q. During the test will I be able to take help from google etc?
A. Yes, you can google and take help from the internet as required.
Q. when I click on the test link Page not found” error appears. What should I do now?
A. The test will not be visible before the start time on test day. If you sign-in before the shared time then “Page
not found” error will appear. Make sure to refresh the page when starting the test.
Q. How will I be evaluated/scored on the questions?
A. Your submitted code will be evaluated on Correctness, Quality, Design and Readability. Please see the
resource limitations below.
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, Node.js 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. The following versions are
installed on the server(Please make sure your code is compatible with them to run on the platform without any
problem):
● Python 3.12
● Node.js (NodeJS 18.12)
● g++ version 9.3
● openjdk version 19
For Java Users Only: Your public class should be named Main and there should be a space between class name and
curly brace. Your main class should have a main method only. You should never create an object of this main class.
And never use the package statement. You may get a class not found error on our online portal if you don’t follow this
convention. Your code must have the following phrase:
public class Main {
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.
If you are not familiar with the terminal, use the following commands to compile and run your code.
Navigate to project folder:
cd <path_to_project_folder>
● Node.js
node solution.js input.in
● Java
javac Solution.java // this will create a .class file
java Solution input.in // this will run your program
● Python
python3 solution.py input.in
● C++
g++ -o a.out -std=gnu++2a main.cpp -lcurl -ljsoncpp // 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 hardcoded
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 match 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. The
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:
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!
Good Luck!