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

Related Articles

  1. Most Frequent Subtree Sum
  2. Making a Height Balanced Binary Search Tree
  3. Top K Frequent words
  4. Daily Interview Problem: Min Range Needed to Sort
  5. Fibonacci coding
  6. [Daily Problem] Longest Palindromic Substring
  7. Daily Interview Problem: Find the k-th Largest Element in a List
  8. Daily Interview Question: Find Cycles in a Graph
  9. Longest Substring Without Repeating Characters
  10. Daily Interview Puzzle: Minimum Size Subarray Sum

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="index, follow">