MaxAB Interview Question

Hash Map problem with any lang