Advertisement

数据结构算法10.1 插入排序以及直接插入

阅读量:
复制代码
    #include<stdio.h>
    #include<string.h>
    #include<stdlib.h>
    
    #define TRUE 1
    #define FALSE 0
    #define OK 1
    #define ERROR 0
    #define INFEASIBLE -1
    #define OVERFLOW -2
    
    #define EQ(a,b) ((a) == (b))
    #define LT(a,b) ((a) <  (b))
    #define LQ(a,b) ((a) <= (b))
    
    typedef int Status;
    typedef int ElemType;
    
    #define MAXSIZE 20
    typedef int KeyType;
    typedef char InfoType;
    typedef struct
    {
    KeyType key;
    InfoType otherinfo;
    }RedType;
    typedef struct
    {
    RedType r[MAXSIZE+1];  //0号单元置空或用作哨兵
    int leng

全部评论 (0)

还没有任何评论哟~