摘要
栈是限定只能在表的一端进行插入和删除的线性表。根据栈的这种存取特征,栈也被称为后进先出表。生活中的穿衣脱衣、九连环游戏、括号匹配等都是应用栈的这一特点。栈的基本操作包括入栈、出栈、得到栈顶元素、判断栈空、判断栈满等等。在该文中我们将讨论栈在中缀表达式求值、后缀表达式求值以及后缀表达式转换成中缀表达式中的应用。
Stack is the linear table which restricted to insert and delete from only one end. According to the access characteristics of stack, the stack is also called the LIFO list. The life of the dressing and undressing, series of nine games, matching parentheses are the characteristics of the application stack. The basic operation of the stack into the stack, the stack, including getting the top element on the stack, determine the stack empty, determine the stack is full and so on. In this paper we discuss the application of stack in infix expression’s calculation, postfix expression’s calculation and convert infix expression to suffix expression.
作者
李橙
丁国栋
LI Cheng, DING Guo-dong (Taizhou College of Nanjing Normal UIfiversity, Taizhou 225300,China)
出处
《电脑知识与技术》
2014年第12期8156-8157,8164,共3页
Computer Knowledge and Technology
关键词
栈
数据结构
线性表
表达式求值
stack
data structure
linear form
expression’s calculation