
bucket sort
文章平均质量分 61
flyatcmu
这个作者很懒,什么都没留下…
展开
-
H-Index
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According to thedefinition of h-index on Wikipedia: "A scientist has indexhifhof his/herNpapers haveat lea...原创 2020-06-20 07:30:24 · 269 阅读 · 0 评论 -
Campus Bikes
On a campus represented as a 2D grid, there areNworkers andMbikes, withN <= M. Each worker and bike is a 2D coordinate on this grid. Our goal is to assign a bike to each worker. Among the available bikes and workers, we choose the (worker, bike) p...原创 2020-06-01 14:47:48 · 270 阅读 · 0 评论 -
Maximum Swap
Given a non-negative integer, you could swap two digitsat mostonce to get the maximum valued number. Return the maximum valued number you could get. Example 1: Input: 2736 Output: 7236 Explanation: Swap the number 2 and the number 7. Example 2: I..原创 2020-05-21 14:33:10 · 195 阅读 · 0 评论 -
Maximum Gap
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 elements. Example Example 1: Input: [1, 9, 2, 5...原创 2014-12-14 15:40:35 · 882 阅读 · 0 评论