My own leetcode code.