查找算法:
摘要:
//顺序查找:技巧,卫兵法,在查找的线性表后加入要查找的元素while(a[i]!=x) i++;return i;//折半查找:low height mid O(log n);//索引分块:把值的范围分成若干个区域,每个区域对应着起始的下标//二叉排序树:动态查找,找不到插入该节点,特点,插入的点时叶子p=tree;parent=NULL;while(p){ if(p->element=key) break; if(p->element>key) parent=p;p=p->pLchild; if(p->element<key) parent=p;p=p- 阅读全文
posted @ 2012-09-04 22:51 为梦飞翔 阅读(279) 评论(0) 推荐(0)
浙公网安备 33010602011771号