期刊文献+

基于二叉树的将中缀表达式转换为前缀表达式的方法 被引量:1

Method for Transformation of Infix Expression into Prefix Expression Based on Binary Tree
下载PDF
导出
摘要 中缀表达式是使用频率最高的表达式形式,对其求值时,一方面要考虑表达式中运算符的优先级,另一方面还要考虑运算符的结合性.尽管运用人的思维能容易地判断中缀表达式的运算顺序,但使用计算机直接处理就会显得非常困难.提出一种基于二叉树的方法,即将中缀表达式转换为前缀表达式,然后在计算机上就可以实现简单求值. Infix expression has the highest usage frequency. For solution, on one hand, priority of operator in expression should be considerd. On the other hand, associativity of operator must considered too. Although it is not difficult for human being' s thinking to judge the operation order of infix expression, it is very difficult for computer to compute directly. A method was proposed based on the binary tree, which transform infrx expression into prefex expression, then solution rules will be simple for computer computing.
作者 胡云
出处 《成都大学学报(自然科学版)》 2012年第3期247-250,263,共5页 Journal of Chengdu University(Natural Science Edition)
关键词 中缀表达式 前缀表达式 二叉树 infix expression prefix expression binary tree
  • 相关文献

参考文献1

  • 1WilliamFord,WilliamTopp.数据结构C++语言描述[M].北京:清华大学出版社,2003.

共引文献1

同被引文献9

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部