2009年12月9日

二分法的递归算法和迭代算法,算法作为有序表模板类的成

摘要: /*对半查找递归算法,算法作为有序表(ordered list)模板类的成员函数*/#include<iostream>using namespace std;template<class T,int size>class Orderedlist{private:int maxsize;int last;T slist[size];public:Orderedlist(){last=-1;maxsize=size;}int Binarysearch(T&x,int low, int high);bool Insert(T &elem,int i);voi 阅读全文

posted @ 2009-12-09 18:44 阿杜的世界 阅读(177) 评论(0) 推荐(0)

导航