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

Related Articles

  1. Batch Programming in XP
  2. Daily Interview Problem: Buddy Strings
  3. Algorithm Interview: Level Order Traversal of Binary Tree
  4. CVE-2015-8874 - cPanel EasyApache Vulnerabilities
  5. Find the non-duplicate number
  6. Binary Tree Level with Minimum Sum
  7. Print a tree level-by-level, with line-breaks
  8. Daily Interview Problem: Minimum Removals for Valid Parenthesis
  9. Daily Interview Problem: Reconstrunct Binary Tree from Preorder and Inorder Traversals
  10. Two Tricks of Delphi

Comments (0)

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />