选择排序
每次选择当前序列中最小的元素放在序列的第一个位置,然后依次从剩下的序列中再次选出最小的元素,放在剩下的序列中的首位。和冒泡排序时间复杂度一样,都是O(n2),空间复杂度为O(1)。但是其性能略优于冒泡排序,代码如下:
1 | public class XuanZe { |
以下是自己写的选择排序:
1 | /** |
敲石101下
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true