Amazon Interview Question for Software Engineer / Developers


Team: RCX
Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
1
of 1 vote

while (!at_other_robot_start_position) {
    move_right 1
}

while (true) {
    move right 2
}

- nim January 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

make the robots in same line with faces in opposite direction and then keep moving left until they meet.. in these case both will move towards each other because left for one will be right for other

- Anonymous January 06, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Question is this i think:

Given there are two robots and they are on two special points on a railway track. The robots need to be programmed with a micro chip. The code in the two chips will be the same. The robots support only these three operations

1. Move Left

2. Move Right

3. Is Special Point : Returns true if any robot is at this point and these are the starting points where robots stand initially.

Make the robots meet?

- Akshat January 09, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If the sensor is not between the 2 robots, it's pretty simple. Make them move in 1 direction say left or right till they meet the sensor. When they reach the sensor stop, eventually they will meet.

Case 2:

If sensor between 2 robots:

Move Left
if(sensor)
speed=speed*2;

They will meet this way as well...

- 04msambit January 11, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Assume there will be no problem in term of line following, and assume we have a distance sensor that can measure how close the bots to the sensor, when it equals 0 , the bot meet

- Andrew Nguyen January 15, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More