Codes for leetcode.org online judge