加拿大二年级计算机专业的家庭作业~ 大家帮忙看看。

mylzw 2004-08-16 03:40:54
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 first

2.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 NAT

3.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 tree

The element is NAT

直接给答案就可以,~ 最好加注释。
...全文
864 33 打赏 收藏 转发到动态 举报
写回复
用AI写文章
33 条回复
切换为时间正序
请发表友善的回复…
发表回复
mylzw 2004-08-19
  • 打赏
  • 举报
回复
up
mylzw 2004-08-18
  • 打赏
  • 举报
回复
up
rand520 2004-08-17
  • 打赏
  • 举报
回复
拒绝E文 奶奶的!!!
zjg751206 2004-08-17
  • 打赏
  • 举报
回复
搜索数据结构
list然后copy到作业里。
csdnzhu 2004-08-17
  • 打赏
  • 举报
回复
不会E文
a1a212 2004-08-17
  • 打赏
  • 举报
回复
数据结构的基本东东.
kvw3000 2004-08-17
  • 打赏
  • 举报
回复
ft
月光莫利亚 2004-08-17
  • 打赏
  • 举报
回复
转到非技术区灌水版~
XmagicX 2004-08-17
  • 打赏
  • 举报
回复
本来还有兴致看的,最后晕啊……
starluck 2004-08-17
  • 打赏
  • 举报
回复
说起来不过是几句英语,其它什么也不是。真是要命
888atao 2004-08-17
  • 打赏
  • 举报
回复
biliangxia(东方不败)
可别说你是用金山译的呀??

我不懂E文
你的我也看不懂

只能UP了
netxy 2004-08-17
  • 打赏
  • 举报
回复
呵呵,前两天做程序时想出来的天才办法,教给你得了。
去C:\Program Files\Microsoft Visual Studio\Vc98\Include里找一个名叫list的文件,打开,全选、复制、粘帖,完成。作业显然不会允许用STL,但是肯定没说不可以用模板吧。;)
atu1985 2004-08-17
  • 打赏
  • 举报
回复
对不起!我不懂!
hongke212 2004-08-17
  • 打赏
  • 举报
回复
这个是数据结构的问题
参考一些这方面的资料应该不难的
steel007 2004-08-17
  • 打赏
  • 举报
回复
很一般的东东~
block1956815 2004-08-16
  • 打赏
  • 举报
回复
NAT Tree??? 呵呵 偶有更详细的 source code~~~
sohou 2004-08-16
  • 打赏
  • 举报
回复
请你参考数据结构自己做
sohou 2004-08-16
  • 打赏
  • 举报
回复
用下面提供的操作符构造一个抽象数据类型LIST
*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: 树中是否存在某个元素
kugou123 2004-08-16
  • 打赏
  • 举报
回复
这全是数据结构方面的题,什么二叉数之类的,怎么给答案啊?我看是需要编程序来实现吧。
mylzw 2004-08-16
  • 打赏
  • 举报
回复
大家帮帮忙吧~
加载更多回复(13)

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧