the code on the leetcode