Alibaba Group Interview Question

Design a setAll function for the hash