java and python codes for leetcode online judge