This is a solution to problem 18 on the hard interview questions node. If you have not read the question, the following will make no sense to you:

Here's some code that will do the trick:

while(!at_other_robots_start) {
  move_right 1
while(true) {
  move_right 2
The idea is that both robots start moving right, and eventually the one on the left will be at the other robot's start, at which point it starts moving twice as fast to catch up to the other robot, which will obviously never hit the first robot's start.

Log in or register to write something here or to contact authors.