Amazon Robotics Interview Question

Leetcode style hashing with for loop