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 | 418 Views, 25009 Search Bots | 38 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 418 Views, 25009 Search Bots | 38 Words
| 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.
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 418 Views, 25009 Search Bots | 38 Words 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]]
Related Articles
- Find Pythagorean Triplets
- Daily Interview Problem: Count Number of Unival Subtrees
- [Daily Problem] Remove Consecutive Nodes that Sum to 0
- Daily Interview Question: Word Search
- Staying on a Chess Board
- Algorithm Interview Question: Max and Min with Limited Comparisons
- Algorithm Interview: Level Order Traversal of Binary Tree
- Daily Interview Question: Create a Simple Calculator
- Linode Support Ticket 10029540 - Other - Important Notice Regarding Ubuntu 17.10 Image
- Daily Interview Question: Find Cycles in a Graph
©2006~2024 SteakOverCooked - 0.00754 Seconds(s) - 2582.977 KB/s - 16 Online Memory: 492.16 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !