ByteDance Interview Question

1. Why hashmap can perform O(1)? 2. Two leetcode medium problems.