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, 20325 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, 20325 Search Bots | 38 Words Subscribe to Feed Burner

Related Articles

  1. Progess made
  2. [Daily Problem] Longest Increasing Subsequence
  3. Sorting a list with 3 unique numbers
  4. Algorithm Interview Question: Symmetric k-ary Tree
  5. Algorithm Interview: Permutations of numbers
  6. Daily Interview Problem: Word Ordering in a Different Alphabetical Order
  7. [Daily Problem] Add two numbers as a linked list
  8. Algorithm Interview Question: Nth Fibonacci Number
  9. Daily Interview Problem: Arithmetic Binary Tree
  10. Daily Interview Problem: Largest BST in a Binary Tree

Comments (0)

    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" />