数据结构
shenlanlan2
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++顺序栈的实现
#include#include#include #include #define Status int#define STACK_INIT_SIZE 100#define ERROR 0#define OK 1#define TRUE 1#define FALSE 0typedef struct{ int *base,*top; int stackSize;}Stac原创 2015-04-23 11:24:47 · 418 阅读 · 0 评论 -
选择排序与冒泡排序
/* * 选择排序,每次从数组中选择一个最小的插入到有序部分, * 数组可分为两部分,前面的有序部分,后面乱序 * 时间复杂度O(n*n) * 不稳定的排序算法。 */public class SelectSort { static void selectSort(int a[]){ for(int i=0;i<a.length-1;i++){ //每次循环只进行原创 2015-09-12 23:58:40 · 277 阅读 · 0 评论
分享