Loading

摘要: 1 double dist( double h, double p ) 2 { 3 double sum = h; 4 while(h*p >= TOL) 5 { 6 h *= p; 7 sum += h*2; 8 } 9 return sum; 10 } 阅读全文
posted @ 2018-09-27 15:01 拾月凄辰 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2018-09-27 14:46 拾月凄辰 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2018-09-27 13:51 拾月凄辰 阅读(99) 评论(0) 推荐(0) 编辑