shuxiong's leetcode solution