首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于二叉树的将中缀表达式转换为前缀表达式的方法
引用本文:胡云.基于二叉树的将中缀表达式转换为前缀表达式的方法[J].成都大学学报(自然科学版),2012(3):247-250,263.
作者姓名:胡云
作者单位:无锡广播电视大学
摘    要:中缀表达式是使用频率最高的表达式形式,对其求值时,一方面要考虑表达式中运算符的优先级,另一方面还要考虑运算符的结合性.尽管运用人的思维能容易地判断中缀表达式的运算顺序,但使用计算机直接处理就会显得非常困难.提出一种基于二叉树的方法,即将中缀表达式转换为前缀表达式,然后在计算机上就可以实现简单求值.

关 键 词:中缀表达式  前缀表达式  二叉树

Method for Transformation of Infix Expression into Prefix Expression Based on Binary Tree
HU Yun.Method for Transformation of Infix Expression into Prefix Expression Based on Binary Tree[J].Journal of Chengdu University (Natural Science),2012(3):247-250,263.
Authors:HU Yun
Institution:HU Yun(Wuxi Radio and Television University,Wuxi 214011,China)
Abstract: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 infix expression into prefex expression,then solution rules will be simple for computer computing.
Keywords:infix expression  prefix expression  binary tree
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号