File: root - text - article - 2020 - 01 - make-the-largest-number.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 342 Views, 23181 Search Bots | 41 Words
| Browse | Archive
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 342 Views, 23181 Search Bots | 41 Words
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Hi, here's your problem today. This problem was recently asked by Uber:
Given a number of integers, combine them so it would create the largest number.
Example:
Input: [17, 7, 2, 45, 72]
Output: 77245217
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 342 Views, 23181 Search Bots | 41 Words Given a number of integers, combine them so it would create the largest number.
Example:
Input: [17, 7, 2, 45, 72]
Output: 77245217
def largestNum(nums):
# Fill this in.
print largestNum([17, 7, 2, 45, 72])
# 77245217
![Subscribe to Feed Burner Subscribe to Feed Burner](/images/form/rss.gif)
Related Articles
- Floor and Ceiling of a Binary Search Tree
- Daily Interview Question: Longest Sequence with Two Unique Numbers
- Invert a Binary Tree
- Print a tree level-by-level, with line-breaks
- Daily Interview Problem: Jump to the End
- Find Missing Numbers in an Array
- Daily Interview Problem: Longest Substring With K Distinct Characters
- Algorithm Interview Question: Max and Min with Limited Comparisons
- Maximum In A Stack
- Daily Interview Problem: Room scheduling
©2006~2024 SteakOverCooked - 0.0182 Seconds(s) - 1025.557 KB/s - 13 Online
Memory: 493.8 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" />
![](/images/top.jpg)
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !