leetcode: update permutations2