more thinking on leetcode