Next Permutation Leetcode Solution 9 Housing