Second time to do leetcode exercise