the resolution code of leetcode