Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
30 views

Instructions - FAQ's - Onsite Coding Test

The document provides instructions and answers frequently asked questions about an online coding test. It details that the test will consist of 4 programming tasks to be completed in 7 hours across 4 languages. It provides information on the programming languages and libraries that can be used. The document explains that the tasks will focus on problem solving, OOP, algorithms, data structures, HTTP requests and JSON data. It provides guidance on reading input from command line arguments, compiling code, understanding grader results, submitting solutions and ending the test.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Instructions - FAQ's - Onsite Coding Test

The document provides instructions and answers frequently asked questions about an online coding test. It details that the test will consist of 4 programming tasks to be completed in 7 hours across 4 languages. It provides information on the programming languages and libraries that can be used. The document explains that the tasks will focus on problem solving, OOP, algorithms, data structures, HTTP requests and JSON data. It provides guidance on reading input from command line arguments, compiling code, understanding grader results, submitting solutions and ending the test.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Instructions & FAQs - 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.

Q. How many languages can I attempt the tasks in?


A. The coding assignments are language agnostic i.e you can attempt any task in any of the 4 available
languages. You can only use the built in libraries of any language unless its specified here:
● Python (Version: 3.12) (you may use 3.11 for your own testing, however, python >= 3.6 should be sufficient)
○ Third-party/extra packages:
■ requests (version 2.28.1) and urllib3 (version 1.26.13)
● Java (Version: OpenJDK 19)
○ Third-party/extra packages
■ SimpleJson (version 1.1.1)
● C++ - Compiler: g++ (9.3) (standard gnu++2a)
○ Third-party/extra packages
■ libcurl4 (version 7.68.0)
■ libjsoncpp (version 1.7.4)
● JavaScript - Runtime: NodeJS (version 18.12)

If you find something difficult in one language, you can solve that problem in a different language as well.

Q. What sort of questions/tasks can I expect in the test?


A. The tasks will preliminary focus on problem solving, OOP, Algorithms, and Data Structures, HTTP
requests, JSON data reading.

Q. What is the input file name? I can’t read the input.


A. The input is read from a file. The filename/path of the file is passed to your program as the first
command-line argument. There is no fixed name for the input file. Do not hardcode the input file name. Each
language has its own method for parsing command-line arguments.

Q. What platform will I be attempting the test on?

● Ensure that you are familiar with File handling


● Our testing platform will have an IDE, you can code and run all your solutions over there.
● You can also use your own IDEs for coding but make sure the versions of languages are those which are
mentioned above.
● You should be able to read the command line arguments in the language you are attempting the question.

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.

Q. What are the resource limitations?


A. You code should execute within these set limitations, otherwise it will be considered as incorrect.
CPU Limit (per test case): 10 seconds
Memory Limit (per test case): 256 MB

Q. How soon will I get feedback on the outcome of my test?


A. We will try sharing feedback within 15 days of taking the test.

Test Platform Instructions

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, 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.

Compiling Your 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

// 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++ -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:

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!

Good Luck!

You might also like