查找 - 分块查找

128 阅读1分钟

算法思想

image.png 特点: 块内无序, 块间有序

// 索引表
typedef struct 
{
    ElemType maxValue;
    int low, high;
}index;

// 顺序表存储实际元素
ElemType List[100];

image.png

折半查找查索引

image.png

查找效率分析(ASL, Average Search Length)