---
title: "Discussion on \"Problem: Permutation\" | Hashnode"
description: "Discussion on \"Problem: Permutation\". Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.\n\n\nExample 1:\n\n\nInput: nums = [1,2,3]\nOutput: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n\n\nExample 2:\n\n\nInput: nums = [0,1]\n..."
url: "https://hashnode.com/posts/problem-permutation/630ff2d056df9e8e5025a746"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Problem: Permutation](https://mackph.hashnode.dev/problem-permutation?utm_source=hashnode&utm_medium=feed)

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = \[1,2,3\] Output: \[\[1,2,3\],\[1,3,2\],\[2,1,3\],\[2,3,1\],\[3,1,2\],\[3,2,1\]\] Example 2: Input: nums = \[0,1\] ...

Aug 31, 2022 · 1 min read · mackph.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#easy-language](https://hashnode.com/tag/easy-language)

## Written by

[ANKUSH KUMAR](https://hashnode.com/@akankushjnvku)

@akankushjnvku · India

  
[View profile](https://hashnode.com/@akankushjnvku)

I am an intermediate back-end developer, graphic and Adobe designer working for the past few years.

({MERN Stack Developer at mackph}) | &lt;Ex-Internshala Student Partner(ISP 16)&gt; | &lt;5 star coder at Hackerrank&gt; | &lt;Self employed at Mackph&gt; | &lt;GSSoC '22 Contributor&gt; | &lt;Ex-Campus Ambassador at International MUN&gt;

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
