xxxxxxxxxx
class Solution {
public:
vector<vector<int>> permute(vector<int>& nums) {
}
};
xxxxxxxxxx
Input: nums = [1,2,3]
Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
xxxxxxxxxx
/**
* Return an array of arrays of size *returnSize.
* The sizes of the arrays are returned as *returnColumnSizes array.
* Note: Both returned array and *columnSizes array must be malloced, assume caller calls free().
*/
int** permute(int* nums, int numsSize, int* returnSize, int** returnColumnSizes){
}
xxxxxxxxxx
/**
* @param {number[]} nums
* @return {number[][]}
*/
var permute = function(nums) {
};
xxxxxxxxxx
class Solution {
/**
* @param Integer[] $nums
* @return Integer[][]
*/
function permute($nums) {
}
}
xxxxxxxxxx
class Solution {
public:
vector<vector<int>> permuteUnique(vector<int>& nums) {
}
};
xxxxxxxxxx
class Solution {
public List<List<Integer>> permuteUnique(int[] nums) {
}
}
xxxxxxxxxx
/**
* Return an array of arrays of size *returnSize.
* The sizes of the arrays are returned as *returnColumnSizes array.
* Note: Both returned array and *columnSizes array must be malloced, assume caller calls free().
*/
int** permuteUnique(int* nums, int numsSize, int* returnSize, int** returnColumnSizes){
}
xxxxxxxxxx
public class Solution {
public IList<IList<int>> PermuteUnique(int[] nums) {
}
}