摘要: 【1】If you want something, give it away. 【2】When a farmer wants more seeds, he takes his seeds and gives them to the earth. When you want a smile, give 阅读全文
posted @ 2018-03-01 21:49 ggsmdaa 阅读(215) 评论(0) 推荐(0)
摘要: 详解: 该数组中只有8个数字(arr.length),所以至少需要进行7遍(arr.length-1)排序。 第一遍排序需要进行7次比较(arr.length-1-i 注:此时i=0)。 第一遍比较完成后数组最末尾的值就为最大值了,所以第二遍就不再需要跟最末尾的数字比较了。 因此第二遍只需要进行6次 阅读全文
posted @ 2018-03-01 16:49 ggsmdaa 阅读(174) 评论(0) 推荐(0)