Solutions to some interesting problems in leetcode