摘要:
顺序存储优点:1 不用额外增加新的节点空间2 可以快速读取任意位置的元素顺序存储缺点:1 插入和删除需要移动大量元素2 长度变化较大时,难以估计长度3 存储空间碎片化读取时,时间复杂度为O(1);插入或删除时,时间复杂度为O(n);实例代码 1 /*Edit by Xhalo*/ 2 #include 3 #include 4 5 #define MAXSIZE 20 6 7 typedef struct seqList{ 8 int data[MAXSIZE]; 9 int length;10 }SL;11 12 13 int initElem(SL *L,int l... 阅读全文
posted @ 2014-01-25 15:03
xingoo
阅读(675)
评论(0)
推荐(0)

浙公网安备 33010602011771号