Amazon Robotics interview question

Leetcode style hashing with for loop