Coding for Leetcode