文件名称:tree
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 57kb
- 下载次数:
- 1次
- 提 供 者:
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
表达式类型的实现:
1、 一个表达式和一颗二叉树之间,存在着自然的对应关系。
2、 假设算术表达式Expression内可以含有变量(a~z)、常量(0~9)和二元运算符(+,-,*,/,^)。实现一下操作。
(1) ReadExpr(E)——以字符序列的形式输入语法正确的前缀表示式并构造表达式E。
(2) WritrExpr(E)——用带括弧的中缀表示式输出表达式E。
(3) Assign(V,c)——实现对变量V的赋值(V=c),变量的初值为0。
(4) Value(E)——对算术表达式E求值。
(5) CompoundExpr(P,E1,E2)——构造一个新的复合表达式(E1)P (E2)。
-Realize the type of expression: one, an expression, and between a binary tree, there is a natural correspondence between. 2, assuming that the arithmetic expression Expression can contain variables (a ~ z), constant (0 ~ 9) and binary operators ( ,-,*,/,^)。 You realize the operation. (1) ReadExpr (E)- sequence of characters in the form of input grammar correct prefix expressions and tectonic expression of E. (2) WritrExpr (E)- used within parentheses express output infix expression E. (3) Assign (V, c)- realize the value V of the variables (V = c), variable initial value is 0. (4) Value (E)- on the arithmetic expression E is evaluated. (5) CompoundExpr (P, E1, E2)- Construction of a new composite expression (E1) P (E2).相关搜索: tree
表达式类型的实现
二叉树
表达式
infix
expression
to
expression
tree
prefix
tree
composite
INPUT
1、 一个表达式和一颗二叉树之间,存在着自然的对应关系。
2、 假设算术表达式Expression内可以含有变量(a~z)、常量(0~9)和二元运算符(+,-,*,/,^)。实现一下操作。
(1) ReadExpr(E)——以字符序列的形式输入语法正确的前缀表示式并构造表达式E。
(2) WritrExpr(E)——用带括弧的中缀表示式输出表达式E。
(3) Assign(V,c)——实现对变量V的赋值(V=c),变量的初值为0。
(4) Value(E)——对算术表达式E求值。
(5) CompoundExpr(P,E1,E2)——构造一个新的复合表达式(E1)P (E2)。
-Realize the type of expression: one, an expression, and between a binary tree, there is a natural correspondence between. 2, assuming that the arithmetic expression Expression can contain variables (a ~ z), constant (0 ~ 9) and binary operators ( ,-,*,/,^)。 You realize the operation. (1) ReadExpr (E)- sequence of characters in the form of input grammar correct prefix expressions and tectonic expression of E. (2) WritrExpr (E)- used within parentheses express output infix expression E. (3) Assign (V, c)- realize the value V of the variables (V = c), variable initial value is 0. (4) Value (E)- on the arithmetic expression E is evaluated. (5) CompoundExpr (P, E1, E2)- Construction of a new composite expression (E1) P (E2).相关搜索: tree
表达式类型的实现
二叉树
表达式
infix
expression
to
expression
tree
prefix
tree
composite
INPUT
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tree
....\Debug
....\fun.cpp
....\fun.h
....\ReadMe.txt
....\StdAfx.cpp
....\StdAfx.h
....\tree.cpp
....\tree.dsp
....\tree.dsw
....\tree.ncb
....\tree.opt
....\tree.plg
....\treefun.cpp
实验报告tree.doc
....\Debug
....\fun.cpp
....\fun.h
....\ReadMe.txt
....\StdAfx.cpp
....\StdAfx.h
....\tree.cpp
....\tree.dsp
....\tree.dsw
....\tree.ncb
....\tree.opt
....\tree.plg
....\treefun.cpp
实验报告tree.doc