摘要:
1 bool Insert( List L, ElementType X ) 2 { 3 int i = 0; 4 if(L->Last == MAXSIZE-1) //元素已满,无法插入 5 return false; 6 7 for(; i Last; ++i) 8 { 9 if(X ... 阅读全文
摘要:
1 Position BinarySearch( List L, ElementType X ) 2 { 3 int left = 1, right = L->Last; 4 int mid; 5 while(left Data[mid] > X) //X在左侧 9 right = mid - 1; 10 ... 阅读全文