Learn practical skills, build real-world projects, and advance your career

Course project

project_name = 'Permutations'

Problem Statement

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

Source: leetcode.com

Solution

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

Problem

'n' no.of inputs are converted into a list which are assigned as an input to a function to return a permutation of that list


Input

  1. n indicating the no.of elements
  2. a list literal to determine its permutation

(add more if required)

Output

  1. The permutation of one or more integers

(add more if required)


Based on the above, we can now create a signature of our function:

def drivefun(n,ip):
    pass