You are on page 1of 2

Coding Exercise

Purpose
With this help of such an exercise, we try to evaluate following abilities of a candidate:
Understanding of a problem
Designing possible solutions
Selection and implementation of one of those solutions
Coding style, documentation and overall approach towards the problem

Problem Statement
Below is an example that you need to understand well before moving onwards.
Below is an array of 6 x 6
0 . . . . x
x . . . . .
.

. . x . .

x . . . .

. . x . .

. . . x .

Here in this example 0 is a robot, . is plane field and x is the trash that robot has to clean up.
robot can move only right,left,up and down on the field to collect the trash.
Now your challenges are:
1. Take the input of current positions of robot and junk for two dimensional array of users choice
with simplest and easiest possible way, you could think of.
2. You have to create a logic that helps robot to pick up the junk from the field with shortest
possible combination of moves.
3. You have to show the field and real time movements of robot step by step on a web page
that should look aesthetically attractive.
4. Web page should be hosted on node.js
5. All the processing should be done at server side with Node js, Client side should only include
logic to manipulate DOM elements
6. Client and Server both should be creating logs at there end.
7. User should be able to see the Toasts messages of application status, some of them can be
(booting up, sending request for calculation of position, receiving request from node,

populating DOM elements, Error occurred, Generating log, Saving state, Collecting Junk,
Process finished etc). There could be many more stages of the whole system you could think
of.
8. User would like to run the simulation again :)

Submission Guidelines
1. The more planned Architecture, more it is better to extend it.
2. Publish your code on Git repo at github.com and share the link with us for evaluation, please
make sure to include the proper instructions for cloning, deploying and running the project in
README.md file.
3. We are expecting you to write the code using HTML5, CSS3, Javascript and Nodejs
technologies.

You might also like