[LeetCode] Remove duplicated codes.