摘要: problem:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest f... 阅读全文
posted @ 2015-07-08 16:33 尾巴草 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 问题描述:用键盘输入一个高精度的正整数N,去掉其中S个数字后剩下的数字按原左右次序排列组成一个新的正整数。 编程给定的N和S,寻找一个方案使得剩下的数字哦组成的新数最小。思路解析: 使用逼近目标的贪心法来逐一逼近删除其中s个数符,每一步总数选择一个是剩下的数最小的数符删除。这样的贪心选择因为... 阅读全文
posted @ 2015-07-08 15:35 尾巴草 阅读(3141) 评论(0) 推荐(1) 编辑