Small Permutation Leetcode 461