Rethink Robotics interview question

whiteboard coding C/C++