System Design Problem Leetcode Two Sum Solution