摘要: Given an integer array of variable length like so [9, 8, 8, 3] where each item in array could be 0 to 9, write a function that would take would interp... 阅读全文
posted @ 2015-09-02 16:23 23lalala 阅读(152) 评论(0) 推荐(0)
摘要: 重新排列数字中的每位,得到最大的数字例如:1234 -》 43211230 -》 32101122 -》 2211想法就是对每位重新排序,从大到小输出,因为每位的可能性只有从0-9,10种可能,所以可以使用桶排序public static int reRange(int num) { int ... 阅读全文
posted @ 2015-09-02 14:45 23lalala 阅读(379) 评论(0) 推荐(0)