一种前缀表达式直接转换为后缀表达式的算法  被引量:3

Algorithm for Converting Prefix Expression to Postfix Expression

在线阅读下载全文

作  者:沈华[1] 

机构地区:[1]湖北工业大学计算机学院网络工程系,武汉430068

出  处:《电脑编程技巧与维护》2013年第2期12-14,共3页Computer Programming Skills & Maintenance

基  金:国家自然科学基金青年基金项目资助(项目编号:41204112)

摘  要:栈是一种重要的线性结构。后缀表达式的运算规则具有"后进先出"的特点。为了帮助学生掌握这个重要的线性结构,深刻体会栈的结构特性,在教学过程中后缀表达式常作为栈的应用实例给学生进行讲解。针对目前前缀表达式转换为后缀表达式的常用方法存在的不足,提出了一种直接转换算法。此算法的时间复杂度为O(n),空间复杂度为O(n)。Stack is an important linear structure. The operation rules of postfix expression have the characteristics of " LI- FO" . In order to help student master stack and deeply understand the structural characteristics of stack, postfix expression is often used as application instances of stack in teaching process. In view of some shortcoming of the commonly-used methods which convert prefix expression to postfix expression, this paper puts forward a direct conversion algorithm. The time com- plexity of this algorithm is 0 (n) , the space complexity is 0 (n) .

关 键 词: 前缀表达式 后缀表达式 算法 

分 类 号:TP311.12[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象