---
title: "Discussion on \"Permutations\" | Hashnode"
description: "Discussion on \"Permutations\". Explain the Problem\nGiven an array nums of distinct integers, return all possible permutations. You can return the answer in any order.\nExample:\nInput: nums = [1, 2, 3]\nOutput:\n[\n  [1, 2, 3],\n  [1, 3, 2],\n  [2, 1, 3],\n  [2, 3, 1],\n  [3, 1, 2],\n  [3, ..."
url: "https://hashnode.com/posts/permutations/667c851bc13b0f3ba92ee010"
---

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

Discussion

# [Permutations](https://lietcode.hashnode.dev/permutations?utm_source=hashnode&utm_medium=feed)

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

Jun 26, 2024 · 3 min read · lietcode.hashnode.dev  
Read the article

-   [#backtracking](https://hashnode.com/tag/backtracking)

## Written by

[Abhi](https://hashnode.com/@lietcode)

@lietcode

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

Let's crack the interviews

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
