1.Specify the abstract data type LIST with the following operations
* null: denotes the empty list
* add: inserts a sort of NAT into the list
* del: deletes an element in the list at a certain position
* length: returns the length of the list
* append: add two lists together
* sum: returns the sum of the natural numbers stored in the list
* isEMPTY: return whether the list is empty specify the NAT and BOOLEAN first2.Specify the abstract data type SET with the following operations* null: denotes the empty set
* add: adds one element to the set
* insert: inserts one element to the set
* remove: deletes one element from the set
* card: returns the union of two sets
* intrsct: returns the intersection of two sets
* isIN: returns whether an element is in the set The element is NAT3.Specify the abstract data type BITREE(binary tree)with the following operations
* empty: denotes the empty tree
* add: creates a binary tree(input is one element and two binary trees,output is a binary tree
with the elemnet as the root and two input trees as the two subtrees)
* left: returns the left subtree
* right: returns the right subtree
* isIN: returns whether an element is in the treeThe element is NAT直接给答案就可以,~ 最好加注释。
* null: denotes the empty list
* add: inserts a sort of NAT into the list
* del: deletes an element in the list at a certain position
* length: returns the length of the list
* append: add two lists together
* sum: returns the sum of the natural numbers stored in the list
* isEMPTY: return whether the list is empty specify the NAT and BOOLEAN first2.Specify the abstract data type SET with the following operations* null: denotes the empty set
* add: adds one element to the set
* insert: inserts one element to the set
* remove: deletes one element from the set
* card: returns the union of two sets
* intrsct: returns the intersection of two sets
* isIN: returns whether an element is in the set The element is NAT3.Specify the abstract data type BITREE(binary tree)with the following operations
* empty: denotes the empty tree
* add: creates a binary tree(input is one element and two binary trees,output is a binary tree
with the elemnet as the root and two input trees as the two subtrees)
* left: returns the left subtree
* right: returns the right subtree
* isIN: returns whether an element is in the treeThe element is NAT直接给答案就可以,~ 最好加注释。
代表*添加空渴望的:把一种纳特插入清单*del:在某些
位置*长度方面删除少许在清单中:归还*添加清单的长
度:添加二一起列出*总和:回报自然数的总和在清单中
储藏*isEMPTY不管清单是空与否,返回首先指定纳特和布尔数学体系的抽象数据类型把下列的运算嵌入2.Specify的*零:表示*添加空集的:给*把装置插入的添加一
要素:向*去除装置的把一要素插入:从*在装置
上附卡片的删除一要素:回报二的联合设定
*intrsct:回报二的横断设定*isIN:不管少许是
在装置中与否,返回要素是纳特3.Specify抽象数据随着*使下列的作业失去的把BITREE(二元树)
归类:表示*添加空树的:建立一棵二元树(投入是一要素和二棵二
元树,输出用elemnet作为根是一棵二元树和当二棵亚树)*离开时
,二输入树:正确归还左边亚树*:归还正确亚树*isIN:不管少许是
在树中与否,返回要素是纳特
NAT,纳特? 什么东西啊
click the mouse,then it will run
翻译成了:
点一下老鼠,然后它就跑了。
灌水专栏吗?
感觉回到了大学的写List,Tree等
*null :表示空list
*add :插入一中NAT到list
*del :删除一个list中的特定位置的元素
*length :求list的长度
*append:两个list合并
*sum :求存储在list中的所有自然数的总和
*isEMPTY:list是否为空必须首先详细阐明NAT和布尔体系2.用下面提供的操作符构造一个抽象数据类型SET
* null:引用空集
add:集合增加一个元素
insert:插入一个元素
remove:删除一个元素
card:返回两个集合的并集
intrsct: 返回两个集合的交集
isIN:集合中是否存在某个元素3.用下面提供的操作符构造一个抽象数据类型BSTR(2叉树)
null: 表示空树
* add: 创建一个2叉树(输入一个元素和2个二叉树,输出一个以该元素为根且以输入的2个树为子树的二叉树)
* left:返回左子树
* right:返回右子树
* isIN: 树中是否存在某个元素
可别说你是用金山译的呀??我不懂E文
你的我也看不懂只能UP了
list然后copy到作业里。
去C:\Program Files\Microsoft Visual Studio\Vc98\Include里找一个名叫list的文件,打开,全选、复制、粘帖,完成。作业显然不会允许用STL,但是肯定没说不可以用模板吧。;)