wizcabbit make some effects in leetcode, here is the solution.