-
数据结构堆栈之后缀表达式求值
此程序用的是后缀表达式求值的方法,其中用到了一个栈,而中缀表达式求值需用到两个栈(操作数栈和操作符栈),所以阅读程序前提是了解中缀表达式和后缀表达式
之间的转换,和后缀表达式求值的过程。关于他们之间的转换,我的概括为:中缀表达式:a*(b+c)-d/f ,先做b+c,即bc+;再做a*(b+c),即abc+*;然后做d/f,即df/;
最后做a*(b+c)-d/f,得abc+*df/-。关于后缀表达式求值过程请参照你的《数据结构指导书》P60~62(下文所指参照页均在此书)。程序里中有些我说的可有可无的东西,我已经说明
程序里只给出了+ - * / 四种运算,其它运算符若需要,
可向程序里插入。你的指导书堆栈实验里提示用到了“运算符重载”,所以添加其他运算时,有可能用到重载,但这里的四则运算我没用到,运算符重载是很重要的
- 2022-11-10 19:15:04下载
- 积分:1
-
Variable postfix infix expression evaluation: Enter the expression,# to end the...
中缀变后缀表达式求值:输入表达式,#为结束符(如1+2#),程序会自动给出后缀表达式,并给出最终计算结果。程序中部分地方有注释-Variable postfix infix expression evaluation: Enter the expression,# to end the character (eg, 1+2#), the program will automatically give postfix expression, and gives the end result. Some parts of the program annotated
- 2022-05-29 12:56:14下载
- 积分:1
-
这是一个关于打印技术的的源码,通过access数据库将数据打印到我们的所需清单上...
这是一个关于打印技术的的源码,通过access数据库将数据打印到我们的所需清单上-This is a print technology on the source, access the database through the data required for printing to our list
- 2023-01-14 05:00:03下载
- 积分:1
-
float型而二叉树的创建及遍历
#include
#include
struct BiTNode //定义二叉树结构体
{
float data;
struct BiTNode *lchild;
struct BiTNode *rchild;
};
//二叉树创建函数
struct BiTNode *CreateTree(float *preorder,float *inorder,int lenth)
{
float *p,*q;
- 2022-12-24 11:10:03下载
- 积分:1
-
ISAM/BTREE 数据库系统 C 语言源程序
ISAM/BTREE 数据库系统 C 语言源程序-ISAM/BTREE Database System C language source
- 2023-01-19 06:05:04下载
- 积分:1
-
大数据处理必备的工具storm最新版
Storm可以非常可靠的处理庞大的数据流,用于处理Hadoop的批量数据。Storm很简单,支持许多种编程语言。是处理大数据的得力助手。
- 2022-02-02 20:13:48下载
- 积分:1
-
最小生成树问题
若要在n个城市之间建设通信网络,只需要架设n...
最小生成树问题
若要在n个城市之间建设通信网络,只需要架设n-1条线路即可。如何以最低的经济代价建设这个通信网,是一个网的最小生成树问题。
(1)利用克鲁斯卡尔算法求网的最小生成树。
(2)实现教科书6.5节中定义的抽象树类型 MFSet。以此表示构造生成树过程中的连通分量。
(3)以文本形式输出生成树中各条边以及他们的权值。
-minimum spanning tree problem to the n-city building communications networks needed to put up only n-1 lines can be. How the lowest economic cost of building the communications network, the network is a minimum spanning tree problem. (1) using Kelushikaer network algorithm for the minimum spanning tree. (2) to achieve 6.5 textbook definition of the abstract tree types MFSet. Spanning Tree Construction said this process of connectivity components. (3) the form of text output spanning trees and the edge of their weights.
- 2023-06-26 07:25:03下载
- 积分:1
-
一个有趣的算法。。。十分有趣
一个有趣的算法。。。十分有趣-an interesting algorithm. . . Very interesting
- 2022-05-25 23:26:43下载
- 积分:1
-
研究生入学考试题,共8题。包括一个简单的界面和8道题目的解答
研究生入学考试题,共8题。包括一个简单的界面和8道题目的解答-that postgraduate entrance examination, and that a total of eight. Including a simple interface and eight topics to answer
- 2022-02-02 00:42:21下载
- 积分:1
-
DELPHI+ACCESS 客户关系管理
DELPHI+ACCESS 客户关系管理-DELPHI+ ACCESS Customer Relationship Management
- 2023-02-22 03:50:03下载
- 积分:1