To the Top
File:  root - text - article - 2020 - 01 - permutations-of-numbers.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 189 Views, 20323 Search Bots | 38 Words

Subscribe to Feed Burner | Browse | Archive
Hi, here's your problem today. This problem was recently asked by Facebook:

You are given an array of integers. Return all the permutations of this array.


def permute(nums):
# Fill this in.

print permute([1, 2, 3])
# [[1, 2, 3], [2, 1, 3], [2, 3, 1], [1, 3, 2], [3, 1, 2], [3, 2, 1]]
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 189 Views, 20323 Search Bots | 38 Words Subscribe to Feed Burner

Related Articles

  1. Absolute Path
  2. Algorithm Interview: No Adjacent Repeating Characters
  3. Find the non-duplicate number
  4. Daily Interview Problem: Largest BST in a Binary Tree
  5. Daily Interview Problem: Circle of Chained Words
  6. YES!!
  7. Daily Interview Question: Create a Simple Calculator
  8. Reverse a Directed Graph
  9. Non-decreasing Array with Single Modification
  10. Algorithm Interview: Maximum Path Sum in Binary Tree

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />