maneesh.chaturvedi
BAN USER- 1of 1 vote
AnswersA robot is placed on an infinite 2D grid. The robot is initially facing the east direction. It moves in a spiral movement turning to its left after each move. The movements are given as an input array.
- maneesh.chaturvedi in India
For example, assume the Robot is initially at (x,y) and the movement array is [4,3,5,2,1,6,...].
After 1st move, Robot will be at (x+4,y)
After 2nd move, Robot will be at (x+4,y+3)
After 3rd move, Robot will be at (x-1,y+3)
After 4th move, Robot will be at (x-1,y+1)
After 5th move, Robot will be at (x,y+1)
After 6th move, Robot will be at (x,y+7)
and so on.
Find the minimum area of the rectangle which can enclose all these points.| Report Duplicate | Flag | PURGE
Amazon Principal Software Engineer Algorithm
RepEvieBBlack, AT&T Customer service email at ASAPInfosystemsPvtLtd
I am Evie from Santa Fe Springs USA, I am working as a manager in a worldwide company. I also ...
How do you propose handle 10 million jobs. The intent is more on parallelizing and distributing the jobs over n nodes so that the system scales.
- maneesh.chaturvedi February 20, 2013