Torch Random Permutations Leetcode