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

表达式与二叉树的相互转换
引用本文:何志宏,毛志军.表达式与二叉树的相互转换[J].数字社区&智能家居,2010(5):1201-1203.
作者姓名:何志宏  毛志军
作者单位:[1]华南师范大学康大学院,广东广州510000 [2]广州市旅游商贸职业学校,广东广州510515
摘    要:数学表达式、栈的操作、二又树的遍历,这几个概念在数据结构的教材中是不可缺少的。数学表达式求值是程序设计语言编译中的一个最基本问题,也是栈应用的一个典型例子,用它来研制出各种类型的电子计算器(前缀计算器、中缀计算器(常见的计算器)、后缀计算器)。在数据结构中没有解决表达式与二又树之间的相互转换关系,也就是说不能由一种表达式迅速地得到另外的两种表达式,也就难于解决其他两种计算器的研制过程。本文旨在研究表达式与二叉树间的相互转换关系,便于由一种表达式(或表达式树)迅速求出其他的表达式,再通过栈的应用(操作)研制出三种不同的计算器(栈的应用在数据结构的教材中都有,在此文中不予介绍)。

关 键 词:表达式  波兰式  逆波兰式  二叉树的遍历  表达式树

The Mutual Conversion Between an Expression and a Binary Tree
HE Zhi-hong,MAO Zhi-jun.The Mutual Conversion Between an Expression and a Binary Tree[J].Digital Community & Smart Home,2010(5):1201-1203.
Authors:HE Zhi-hong  MAO Zhi-jun
Affiliation:1.Guangzhou Kangda Institute of South China Normal University;Guangzhou 510000;China;2.Guangzhou Vocational School of Tourism and Business;Guangzhou 510515;China
Abstract:The concepts such as mathematical expression,stack operation and binary tree traversal must be presented in data structure. Evaluation of a mathematical expression is not only a basic problem in a programming language compiling,but also a typical example of stack application which could be used to develop all kinds of calculators (prefix calculator,infix calculator and postfix calculator). Mutual conversions between an expression and a binary tree remain unsolved in data structure,that is to say,it is impos...
Keywords:expression  polish notation  reverse polish notation  binary tree traversal  expression tree  
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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