Leetcode Implementation Problems