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 | 568 Views, 25830 Search Bots | 41 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 568 Views, 25830 Search Bots | 41 Words
| Browse | Archive
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 | 568 Views, 25830 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
Related Articles
- First and Last Indices of an Element in a Sorted Array
- Number of Ways to Climb Stairs
- Daily Interview Problem: Find the k-th Largest Element in a List
- Daily Interview Question: Word Search
- Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
- [Daily Problem] Add two numbers as a linked list
- CPU Utilization
- Daily Interview Problem: Running Median
- Linode Support Ticket 10029540 - Other - Important Notice Regarding Ubuntu 17.10 Image
- Non-decreasing Array with Single Modification
©2006~2024 SteakOverCooked - 0.00722 Seconds(s) - 2699.137 KB/s - 33 Online Memory: 493.11 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 !