System Design Problem Leetcode Two Sums Python