91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 21KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-10
  • 語言: 其他
  • 標(biāo)簽:

資源簡(jiǎn)介

用二叉樹實(shí)現(xiàn)中綴表達(dá)式轉(zhuǎn)換成后綴表達(dá)式,內(nèi)含一個(gè)CPP文件的代碼和一個(gè)截圖,很不錯(cuò)的,是我自己寫的。

資源截圖

代碼片段和文件信息

#include
#include
#include
#include
using?namespace?std;

class?Tree_Node
{
public:
char?oper;
Tree_Node?*left;
Tree_Node?*right;

Tree_Node(char?op){
left=right=NULL;
oper=op;
}
};

inline?void?free_Tree(Tree_Node?*p)
{
if(p->left!=NULL){
free_Tree(p->left);
}
if(p->right!=NULL){
free_Tree(p->right);
}
delete(p);
}

int?prioritySX(char?op)
{
switch(op){
case?‘(‘:
return?1;
case?‘+‘:
case?‘-‘:
return?2;
case?‘*‘:
case?‘/‘:
return?3;
case?‘^‘:
return?4;
default:
return?0;
}
}

bool?judge(char?op)
{
char?opera[]={‘(‘‘)‘‘+‘‘-‘‘*‘‘/‘‘^‘};

for(int?i=0;i if(op==opera[i]){
return?true;
}
}
return?false;
}

void?post_order(Tree_No

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????22120??2010-11-23?16:07??中綴到后綴\截圖.jpg

?????文件???????2611??2010-11-23?16:14??中綴到后綴\用二叉樹實(shí)現(xiàn)中綴表達(dá)式到后綴表達(dá)式的轉(zhuǎn)換.cpp

?????目錄??????????0??2010-11-23?16:17??中綴到后綴

-----------?---------??----------?-----??----

????????????????24731????????????????????3


評(píng)論

共有 條評(píng)論

相關(guān)資源