Leetcode Hashmap Based Problems That Sleep