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

Related Articles

  1. Daily Interview Problem: Merge K Sorted Linked Lists
  2. Reverse a Linked List
  3. [Daily Problem] Witness of The Tall People
  4. Daily Interview Question: Longest Sequence with Two Unique Numbers
  5. Daily Interview Puzzle: Intersection of Linked Lists
  6. Find Missing Numbers in an Array
  7. Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
  8. Daily Interview Problem:Create a balanced binary search tree
  9. Daily Interview Question: Create a Simple Calculator
  10. Fibonacci coding

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