Amazon Robotics interview question

Leet code type technical question