摘要: Given a list of non negative integers, arrange them such that they form the largest number. Example 1: Input: [10,2] Output: "210" Example 2: Input: [ 阅读全文
posted @ 2018-10-03 14:09 bernieloveslife 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 el 阅读全文
posted @ 2018-10-03 14:07 bernieloveslife 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return 1 n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimize your algorith 阅读全文
posted @ 2018-10-03 14:06 bernieloveslife 阅读(93) 评论(0) 推荐(0) 编辑
摘要: International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to ". ", "b" map 阅读全文
posted @ 2018-10-03 14:06 bernieloveslife 阅读(110) 评论(0) 推荐(0) 编辑
摘要: In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2018-10-03 14:05 bernieloveslife 阅读(124) 评论(0) 推荐(0) 编辑